SlideShare a Scribd company logo
1 of 101
Matrix Algebra Basics


       by Nittaya Noinan
Kanchanapisekwittayalai phechabun
              M.4
Algebra
Matrix Algebra
• Matrix algebra is a means of expressing large
  numbers of calculations made upon ordered sets of
  numbers.
• Often referred to as Linear Algebra
• Many equations would be completely intractable if
  scalar mathematics had to be used. It is also
  important to note that the scalar algebra is under
  there somewhere.
Matrix (Basic Definitions)
    An m × n matrix A is a rectangular array of
numbers with m rows and n columns. (Rows are
horizontal and columns are vertical.) The numbers
m and n are the dimensions of A. The numbers in
the matrix are called its entries. The entry in row i
and column j is called aij .

               a11 ,    , a1n
               a21 ,    , a2 n
         A                        Aij

               ak 1 ,   , akn
                                                        4
Matrix
A matrix is any doubly subscripted array of
elements arranged in rows and columns.

       a11 , , a1n
       a 21 , , a 2n
A                                 Aij

       am1 , , amn
Definitions - Matrix

• A matrix is a set of rows and columns of
  numbers           1 2 3
                  4 5 6
• Denoted with a bold Capital letter
• All matrices (and vectors) have an order -
  that is the number of rows x the number of
  columns.
• Thus A = 1 2 3
              4 5 6   2x3
Definitions - scalar

• scalar - a number
  – denoted with regular type as is scalar algebra
  – [1] or [a]
Definitions - vector
• vector - a single row or column of numbers
   – denoted with bold small letters
   – row vector a =      1 2 3 4       5

   – column vector x =
                           x1
                           x2
                           x3
                           x4
                           x5
Row Vector

[1 x n] matrix


     A a1 a 2 ,   , an   aj
Column Vector
[m x 1] matrix


                 a1
                 a2
        A             ai

                 am
Special matrices
• There are a number of special matrices
  – Square
  – Diagonal
  – Symmetric
  – Null
  – Identity
Square matrix
• A square matrix is just what it sounds like, an nxn matrix

                  a11   a12   a13   a14
                  a21 a22     a23   a24
                  a31 a32     a33   a34
                  a41 a42     a43   a44
• Square matrices are quite useful for describing the
  properties or interrelationships among a set of things –
  like a data set.
Square Matrix
Same number of rows and
columns
             5 4 7
    B        3 6 1
             2 1 3
Diagonal Matrices
– A diagonal matrix is a square matrix that has
  values on the diagonal with all off-diagonal
  entities being zero.


                a11    0    0   0
                 0    a22   0   0
                 0     0    a33 0
                 0     0     0 a44
Symmetric Matrix
• All of the elements in the upper right portion of
  the matrix are identical to those in the lower
  left.
• For example, the correlation matrix
Identity Matrix
• The identity matrix I is a diagonal matrix
  where the diagonal elements all equal one.
  It is used in a fashion analogous to multiplying
  through by "1" in scalar math.


                       1 0 0 0
                       0 1 0 0
                       0 0 1 0
                       0 0 0 1
Null Matrix
• A square matrix where all elements equal zero.
                      0 0 0 0
                      0 0 0 0
                      0 0 0 0
                      0 0 0 0
• Not usually ‘used’ so much as sometimes the result
  of a calculation.
   – Analogous to “a+b=0”
Types of Matrix
• Identity matrices - I                • Symmetric


                      1   0    0   0            ab c
          10          0   1    0   0            bd e
          01          0   0    1   0            c e f
                      0   0    0   1     – Diagonal matrices are (of
• Diagonal                                 course) symmetric
                                         – Identity matrices are (of
             1   0   0    0                course) diagonal
             0   2   0    0
             0   0    1   0
             0   0   0     4
The
Identity
Identity Matrix
Square matrix with ones on the
diagonal and zeros elsewhere.
            1   0   0   0
            0   1   0   0
    I
            0   0   1   0
            0   0   0   1
Operations with Matrices (Transpose)
Transpose
The transpose, AT , of a matrix A is the matrix obtained from A by
writing its rows as columns. If A is an k×n matrix and B = AT then
B is the n×k matrix with bij = aji. If AT=A, then A is symmetric.

Example:
                 T     a11 a21
  a11 a12 a13
                       a12 a22
  a21 a22 a23
                       a13 a23
 It it easy to verify :
 (A   B)T       AT   B T , (A    B)T   AT   BT ,
 (AT )T  A, (rA)T   rAT
 w here A and B are k n and r is a scalar.
 Let C be a k m matrix and D be an m n matrix. Then,
 (CD)T      DT C T ,
The Transpose of a Matrix At
• Taking the transpose is an operation that
  creates a new matrix based on an existing
  one.
• The rows of A = the columns of At
• Hold upper left and lower right corners and
  rotate 180 degrees.
Transpose Matrix
     Rows become columns and
     columns become rows

    a11 , a12,      , a1n           a11 , a 21 , , an1
    a 21 , a 22,    , a2n       t   a12 , a 22 , , an 2
A                           A
    am1 , am 2      , amn           a1m, a 2 m , , anm
Example of a transpose



      1 4
               t   1 2 3
  A   2 5 ,A
                   4 5 6
      3 6
The Transpose of a Matrix At
• If A = At, then A is symmetric (i.e. correlation matrix)
• If A AT = A then At is idempotent
   – (and A' = A)
• The transpose of a sum = sum of transposes
• The transpose of a product = the product of the
  transposes in reverse order

 (A   B    C)t      At   Bt   Ct
Transpose Matrix
    Ex 1


     1     2
                           T   1 3 1
A    3     0           A
      1 4                      2 0 4
               (3 2)                   (2 3)
Transpose Matrix
    Ex 2


    4   1    4 3                   4   0 2
B   0      1 3 1           B   T
                                   1    1 7
    2   7    5 2                   4   3 5
                   (3 4)           3   1   2
                                               (4 3)
Matrix Equality
• Two matrices are equal iff (if and only if) all of
  their elements are identical
• Note: your data set is a matrix.
Matrix Equality
Ex1. Assume A = B             find x , y ,z

               1       2             x    2
       A       3       0     ,B      3    y
                1 4                  z    4

Solution.   If A =   B that mean
               x =    1
               y =   0
               z =   -1
Matrix Equality
Ex2. Assume C = D               find x , y ,z
      x         y   1     4 3               4    1    4 3
C           0        1 3 1         ,D       0     1 3 1
            2       7     5 2               y    7    5    z
Solution.       If C = D that mean y = 2 , z = 2 and
                                x + y = 4 thus x + 2 = 4
                                then x = 2
Matrix Operations
•   Addition and Subtraction
•   Multiplication
•   Transposition
•   Inversion
Matrix Addition

   A new matrix C may be defined as the
   additive combination of matrices A and
   B where: C = A + B
   is defined by:

     Cij            Aij            Bij
Note: all three matrices are of the same dimension
Addition
             a11 a12
       A
If           a 21 a 22

             b11 b12
and    B
             b 21 b 22

              a11 b11 a12 b12
then   C
              a 21 b 21 a 22 b22
If A and B are both m n matrices then the sum of A
and B, denoted A + B, is a matrix obtained by adding
corresponding elements of A and B.
corresponding elements of A and B.
                   add
                     addadd add
                      add
                   these
                       add
                     these these 0 4
                                 3
         111    222 222these
                      theseB
                       these      33 300 0 44 4
     AA 1
      A 0 1       22 22
                111 333
                            B B 2 33 00 444
                             B       1
                             B 2 21 1 4 4
       A 00
        A 0                   B 2 1          4
                  11 33           2 1        4
            0                      2 1        4
                         2  2
                        22 22        6
          A
          AA    B
                BB      22 2
                         2  2       6
                                    66
          A
          AA    B
                BB      2  0          1
                        22  0
Matrix Addition Example


          3 4   1 2     4 6
A    B                         C
          5 6   3 4     8 10
A B B A




 A (B C)   ( A B) C
Addition and Subtraction (cont.)

                a11 b11      c11
• Where         a12   b12    c12
                a21 b21      c 21
                a22    b22   c 22
                a31 b31      c31
                a32   b32    c32



• Hence   1 2         4 6           5   8
          3 4         4 6           7 10
          5 6         4 6           9 12
Matrix Subtraction

       C = A - B
       Is defined by


Cij                 Aij               Bij
Note: all three matrices are of the same dimension
Subtraction
                a11 a12
       A
If              a 21 a 22

                b11 b12
and    B
                b 21 b 22

then
                  a11 b11 a12 b12
            C
                  a 21 b21 a 22 b22
Addition and Subtraction (cont.)

                a11 b11      c11
• Where         a12    b12   c12
                a 21 b21     c 21
                a 22   b22   c 22
                a31 b31      c31
                a32    b32   c32



• Hence   1 2      4 6              3   4
          3 4      4 6              1   2
          5 6      4 6              1   0
Operations with Matrices (Scalar Multiple)

Scalar Multiple
If A is a matrix and r is a number (sometimes
called a scalar in this context), then the scalar
multiple, rA, is obtained by multiplying every
entry in A by r. In symbols, (rA)ij = raij .


Example:

                      3 4 1   6   8 2
                  2
                      6 7 0   12 14 0



                                                    41
Scalar Multiplication
• To multiply a scalar times a matrix, simply
  multiply each element of the matrix by the
  scalar quantity


             a11   a12   2a11   2a12
         2
             a21 a22     2a21 2a22
If A is an m n matrix and s is a scalar, then we let kA
 denote the matrix obtained by multiplying every
 element of A by k. This procedure is called scalar
 multiplication.
      1     2 2         31 3 2 3 2              3      6 6
A                3A
      0     1 3         30 3 1 33               0      3 9
      PROPERTIES OF SCALAR MULTIPLICATION
                k hA         kh A
                  k   h A      kA hA
                k A B          kA kB
The m n zero matrix, denoted 0, is the m   n
matrix whose elements are all zeros.

  0 0
                          0 0 0
  0 0
                            1   3
  2   2

          A     0      A
          A     ( A)            0
          0 A         0
Operations with Matrices (Product)
Product
If A has dimensions k × m and B has dimensions m × n, then the product
AB is defined, and has dimensions k × n. The entry (AB)ij is obtained
by multiplying row i of A by column j of B, which is done by multiplying
corresponding entries together and then adding the results i.e.,
                         b1 j
                         b2 j
  ( ai1 ai 2 ... aim )               ai1b1 j   ai 2b2 j     ...   aim bmj .
                         
                         bmj
  Example
   a b                          aA     bC      aB     bD
              A B
   c d .                        cA     dC      cB     dD
         C D
   e f                          eA     fC      eB      fD
                                 1 0 0
                                 0 1 0
  Identity matrix I                                       for any m      n matrix A, AI   A and for
                                   
                                 0 0 1         n n

  any n      m matrix B, IB               B.
Matrix Multiplication (cont.)
• To multiply a matrix times a matrix, we write
     • A times B as AB
• This is pre-multiplying B by A, or post-
  multiplying A by B.
Matrix Multiplication (cont.)
• In order to multiply matrices, they must be
  conformable (the number of columns in A
  must equal the number of rows in B.)
• an (mxn) x (nxp) = (mxp)
• an (mxn) x (pxn) = cannot be done
• a (1xn) x (nx1) = a scalar (1x1)
Matrix Multiplication (cont.)
• The general rule for
  matrix multiplication
  is:
      N
cij         aik bkj where i 1,2,..., M , and j 1,2,..., P
      k 1
Matrix Multiplication

Matrices A and B have these dimensions:




      [r x c] and [s x d]
Matrix Multiplication
Matrices A and B can be multiplied if:

         [r x c] and [s x d]

                 c=s
Matrix Multiplication

The resulting matrix will have the dimensions:

           [r x c] and [s x d]

                   rxd
Computation: A x B = C

             a11 a12
    A                        [2 x 2]
             a 21 a 22
            b11 b12 b13
    B                              [2 x 3]
            b 21 b 22 b 23
        a11b11 a12b21 a11b12 a12b22 a11b13 a12b23
C
        a 21b11 a 22b21 a 21b12 a 22b22 a 21b13 a 22b23
                         [2 x 3]
Computation: A x B = C

         2 3
                                           111
A       11        and B
                                           1 0 2
        1 0
        [3 x 2]                            [2 x 3]
               A and B can be multiplied


    2 *1 3 *1 5 2 *1 3 * 0      2 2 *1 3 * 2 8       528
C   1*1 1*1 2 1*1 1* 0 1 1*1 1* 2 3                  213
    1*1 0 *1 1 1*1 0 * 0 1 1*1 0 * 2 1               111

                        [3 x 3]
Computation: A x B = C

         2 3
                                        111
A       11        and B
                                        1 0 2
        1 0
        [3 x 2]                        [2 x 3]
                    Result is 3 x 3


    2 *1 3 *1 5 2 *1 3 * 0     2 2 *1 3 * 2 8    528
C   1*1 1*1 2 1*1 1* 0 1 1*1 1* 2 3              213
    1*1 0 *1 1 1*1 0 * 0 1 1*1 0 * 2 1           111

                       [3 x 3]
The multiplication of matrices is easier shown
 than put into words. You multiply the rows of
 the first matrix with the columns of the second
 adding products Find AB
                                        2     4
          3     2    1
    A                               B    1 3
          0    4        1
                                          3 1
3 22
 3      22 11       1       3   5
First we multiply across the first row and down the
first column adding products. We put the answer in
the first row, first column of the answer.
Find AB
                                            2     4
            3      2    1
      A                             B        1 3
            0     4      1
                                             3 1

           5 77
           5 7
   AB
   AB            0034 4 442313 3 1 1 3 11 1
                 0 24 4 3
                 3 4
                  0 2       2    1 1 7
                                 1
            1 11

Notice the sizes of A and B and the size of the product AB.

Now we multiplyacross first first androw and down
Now we multiply across the row rowrow and down
  We multiplied across the second down first the
                            second and down
the second column we’ll put the the answerthe the
second column andand we’ll put answer inrow, first
the first column and the answer inanswer in the
  column so we put we’ll put the the first in
second row, first column.
row, second second column.
second row, column.
  first column.
To multiply matrices A and B
   look at their dimensions

    m n                n p
          MUST BE
          SAME

          SIZE OF
          PRODUCT

If the number of columns of A does not
equal the number of rows of B then the
        product AB is undefined.
Now let’s look at the product BA.

                2     4             3     2     1
                                A
         B       1 3                0    4       1
                 3 1       3221 2 2 3 14340 4 102
                           1111 3 21 3 404 943
                            323 1 011 612
                                     4          14
                    3 2                 2 3
across third row                66 12
                                 6 12
                                  6 12
                                     12          222
                                                   2
as we first row
acrossgo down
 across first row
         third row
         second
third asgodown
as wecoluacross
 row we go
 as wego down           BA
                         BA
                          BA
                           BA 33 14
                            BA 3 14  14              44
                                                      4
first column: as
 secondrow
secondfirst
 first second
 downcolumn:
 thirdcolumn:
          column:
we go down
column:
 column:                          9 10
                                   9 10              4
                 Commuter's Beware!
third column:
mn:
Completely different than AB!           AB BA
PROPERTIES OF MATRIX
               MULTIPLICATION

            A BC  AB C
            A B C AB AC
            A B C AC BC

                AB BA
Is it possible for AB = BA ? ,yes it is possible.
2       1 2                   Multiplying a
        What is AI?       0       1       5       A    matrix by the
                          1 20 3 0
                          2                            identity gives
                                                      the matrix back
                 I3   2   011 0
                            2                              again.
        What is IA?   0       1       5       A
                                                             1 0 0
    2    1 2          2   020 1
                            3
A   0    1   5
                                                        I3   0 1 0
    2    2 3                                                 0 0 1


        an n n matrix with ones on the main
            diagonal and zeros elsewhere
Matrix multiplication is not
             Commutative
• AB does not necessarily equal BA
• (BA may even be an impossible operation)
Yet matrix multiplication is Associative
• A(BC) = (AB)C
Laws of Matrix Algebra

• The matrix addition, subtraction, scalar multiplication and matrix
  multiplication, have the following properties.

     Associative Laws :
     A (B C)          (A B) C, (AB)C A(BC).
     Commutative Law for Addition :
     A B        B A
     Distributive Laws :
     A(B C)        AB AC, (A B)C AC BC.
An example - cont
• Since the matrix product is a scalar found by
  summing the elements of the vector squared.
Determinants
• Determinant is a scalar
    – Defined for a square matrix
    – Is the sum of selected products of the elements of the matrix, each product
      being multiplied by +1 or -1


                 a11   a12  a1n
                 a21   a22  a2 n     n
                                                       i j
                                                                    n
       det( A)                              aij ( 1)         M ij         aij ( 1)i j M ij
                                  j 1                           i 1

                 an1   an 2  ann



            • Mij=det(Aij), Aij is the (n-1) (n-1)
            submatrix obtained by deleting row
            i and column j from A.
Determinants
                                                                                    a b
• The determinant of a 2 ×2 matrix A is                            det( A)                ad bc
                                                                                    c d
• The determinant of a 3 ×3 matrix is

    a11 a12 a13
                        11
                             a22 a23              1 2
                                                        a21 a23          13
                                                                              a21 a22
    a21 a22 a23 a11 ( 1)                   a12 ( 1)               a13 ( 1)
                             a32 a33                    a31 a33               a31 a32
    a31 a32 a33


 Example
         1 2      3
                                 5     6                  4 6                   4 5
         4 5      6   1( 1)1 1                2( 1)1 2              3( 1)1 3
                                 8 10                     7 10                  7 8
         7 8 10
                       50 48 2(40 42) 3(32 35)                           3

    • In Matlab: det(A)              = det(A)
The Determinant of a Matrix
• The determinant of a matrix A is denoted by
  |A|.
• Determinants exist only for square matrices.
• They are a matrix characteristic, and they are
  also difficult to compute
The Determinant for a 2x2 matrix
• If A =
              a11   a12
              a21 a22



• Then

              A       a11a22 a12a21

• That one is easy
The Determinant for a 3x3 matrix
• If A =

                      a11   a12   a13
                      a21 a22     a23
                      a31 a32     a33
• Then


    A a11a22a33 a11a23a32 a12a23a31 a12a21a33 a13a21a32 a13a22a31
Determinants
• For 4 x 4 and up don't try. For those
  interested, expansion by minors and cofactors
  is the preferred method.
• (However the spaghetti method works well!
  Simply duplicate all but the last column of the
  matrix next to the original and sum the
  products of the diagonals along the following
  pattern.)
Properties of Determinates
• Determinants have several mathematical properties
  which are useful in matrix manipulations.
    – 1 |A|=|A'|.
    – 2. If a row of A = 0, then |A|= 0.
    – 3. If every value in a row is multiplied by k, then |A| =
      k|A|.
    – 4. If two rows (or columns) are interchanged the
      sign, but not value, of |A| changes.
    – 5. If two rows are identical, |A| = 0.
Properties of Determinates
– 6.     |A| remains unchanged if each element of
  a row or each element multiplied by a constant, is
  added to any other row.
– 7.     Det of product = product of Det's |AB| =
  |A| |B|
– 8.     Det of a diagonal matrix = product of the
  diagonal elements
Matrix Division

We have seen that for 2x2 (“two by two”)
matrices A and B then AB BA

To divide matrices we need to define
what we mean by division!

With numbers or algebra we use b/a to
solve ax=b. The equivalent in 2x2
matrices is to solve AX=B where A, B
and X are 2x2 matrices.
Inverse Matrix
In numbers, the inverse of 3 is 1/3 = 3-1
In algebra, the inverse of a is 1/a = a-1
In matrices, the inverse of A is A-1

3-1 is defined so that 3 x 3-1 = 3-1 x 3 = 1
a-1 is defined so that a x a-1 = a-1 x a = 1
A-1 is defined so that A A-1 = A-1 A = I

However, for a square matrix A there is
not always an inverse A-1
Inverse Matrix
In matrices, the inverse of A is A-1

A-1 is defined so that A A-1 = A-1 A = I

However, for a square matrix A there is
not always an inverse A-1

If A-1 does not exist then the matrix is
said to be singular

If A-1 does exist then the matrix is said to
be non-singular
Inverse Matrix
In matrices, the inverse of A is A-1

A-1 is defined so that A A-1 = A-1 A = I

A square matrix A has an inverse if, and
only if, A is non-singular.

If A-1 does exist the the solution to AX=B
is

            X = A-1 B
Inverse Matrix
A-1 is defined so that A A-1 = A-1 A = I

If A-1 does exist the the solution to AX=B is

                         AX = B

Pre-multiply by A-1         A-1AX = A-1B

But A-1A = I so          IX = A-1B
                          X = A-1B
Inverse Matrix
                        AX = B

Pre-multiply by A-1         A-1AX = A-1B

But A-1A = I so          IX = A-1B
                          X = A-1B

If the inverse of A is A-1 then the inverse of A-1
is A. This is because if AC = I then CA = I, and
also any matrix inverse is unique.
Inverse Matrix
If the inverse of A is A-1 then the inverse
of A-1 is A. This is because if AC = I then
CA = I, and also any matrix inverse is
unique.                     2 1
                      B
                            0 3
What is the inverse of
         1   u v
   let B                     1   1 3    1
            w x            B
                                 6 0 2



Then solve for u, v, w, x
General Inverse Matrix
     a b                1   u    v   1 d    b
C               let C
     c d                    w x      D c    a
                                where D ad bc


    au bw 1    c   acu bcw c
    cu dw 0    a   cau daw 0
    av bx 0        Subtract :
    cv dx 1        (ad bc) w  c
Inverse of a Matrix
• Definition. If A is a square matrix, i.e., A has dimensions n×n. Matrix A is
  nonsingular or invertible if there exists a matrix B such that AB=BA=In. For
  example.
                                   2    1    2       1     1 1
                         1     1   3    3    3       3     3 3   1 0
                             1 2   1    1        2       2 1 2   0 1
                                   3    3        3       3 3 3
 Common notation for the inverse of a matrix A is A-1
 The inverse matrix A-1 is unique when it exists.
 If A is invertible, A-1 is also invertible  A is the inverse matrix of A-1.
  (A-1)-1=A.
                                                            • Matrix division:
  If A is an invertible matrix, then (AT)-1 = (A-1)T            A/B = AB-1



                  • In Matlab: A-1     = inv(A)
Calculation of Inversion using Determinants

Def: For any n n matrix A, let Cij denote the (i,j)th
cofactor of A, that is, (-1)i+j times the determinant of
the submatrix obtained by deleting row i and
column j form A, i.e., Cij = (-1)i+j Mij . The n n matrix
whose (i,j)th entry is Cji, the (j,i)th cofactor of A is
called the adjoint of A and is written adj A.


       Thm: Let A be a nonsingular matrix. Then,
                    1
            A-1         adj A.
                  det A           thus
Calculation of Inversion using Determinants
                                                                                   2 4 5
Example: find the inverse of the matrix
                                                                          A        0 3 0
Solve:                                                                             1 0 1
                     3        0                     0 0                            0   3
         C11                          3, C12                     0, C13                        3,
                     0        1                     1 1                            1   0
                     4        5                      2       5                         2   4
         C21                           4, C22                             3, C23                    4,
                     0        1                     1        1                         1   0
                     4        5                          2       5                     2   4
         C31                           15, C32                            0, C33                    6,
                     3        0                          0       0                     0   3
         det A           9,
                     C11          C21       C31      3               4        15
         adjA        C12          C22       C32      0               3        0    .
                     C13          C23       C33          3       4            6
                                       3       4     15
         So,     A   1            1
                                       0        3    0       .
                                                               thus Determinants to find the
                                                                 Using
                                  9                                      inverse of a matrix can be very
                                        3      4     6
                                                                         complicated. Gaussian elimination is
                                                                         more efficient for high dimension
                                                                         matrix.
Calculation of Inversion using Gaussian Elimination

 Elementary row operations:

     o Interchange two rows of a matrix
     o Change a row by adding to it a multiple of
       another row
     o Multiply each element in a row by the same
       nonzero number

•   To calculate the inverse of matrix A, we apply the elementary row
    operations on the augmented matrix [A I] and reduce this matrix to the
    form of [I B]

•   The right half of this augmented matrix B is the inverse of A
Calculation of inversion using Gaussian elimination
       a11 ,     , a1n                       a11 ,   , a1n 1 0  0
       a21 ,     , a2 n                      a21 ,   , a2 n 0 1 0
A                                    [A I]
       an1 ,     , ann
                                             an1 ,   , ann 0 0 1

I is the identity matrix, and use Gaussian elimination to
obtain a matrix of the form 1 0  0 b11 b12 b1n
                                             0 1 0 b21 b22          b2 n


                                             0 0  1 bn1 bn 2        bnn
    The matrix            b11 b12    b1n
                          b21 b22    b2 n
                     B                        is then the matrix inverse of A
                          bn1 bn 2   bnn
Example
            1 1      1
                                                       1 1 1 |1 0 0
     A     12 2       3                      [A| I]    12 2 3 | 0 1 0
            3 4      1                                 3 4 1 |0 0 1

(ii)+(-12) (i), (iii)+(-3)      (i), (iii)+(ii)
                                                                              3    1
  (1/10)                                                1   0     0 | 0.4
           1   1     1 | 1           0 0                                     35    7
                                                                              2    3
           0 10 15 | 12   1 0                           0   1    0 | 0.6
                                                                             35    7
           0 0 3.5 | 4.2 0.1 1                                                1     2
                                                        0   0     1 | 1.2
                                                                             35     7
                                      3     1
     The matrix              0.4
                                     35     7         is then the matrix inverse of A
                                       2    3
                              0.6
                                      35    7
                                       1    2
                          1.2
                                      35    7
Can we find a matrix to multiply the first
matrix by to get the identity?
                               1
             3     1      1             1 0
                            ? 32
            4     2      2              0 1
                              2
                   1
            1              3     1      1 0
                   2
                  3       4     2       0 1
           2
                  2
 Let A be an n n matrix. If there exists a matrix B such
 that AB = BA = I then we call this matrix the inverse of
 A and denote it A-1.
If A has an inverse we say that A is nonsingular.
If A-1 does not exist we say A is singular.

 To find the inverse of a matrix we put the matrix A, a
 To find the inverse of a matrix we put the matrix A, a
 line and then the identity matrix. We then perform row
 line and then the identity matrix. We then perform row
 operations on matrix A to turn it into the identity. We
 operations on matrix A to turn it into the identity. We
 carry the row operations across and the right hand side
 carry the row operations across and the right hand side
 will turn into the inverse.
                    inverse.        1      3
                           A
                                   2     7
   1        3     1 0
                                       1 3     1       0
    2       7 0 1                 r2   0 1      2      1
        1   3     1 0          r 1 r2 1 0       7      3
2r1+r 0         1 2 1                  0 1         2       1
1     3                  7    3
A                       A   1
        2    7                   2    1

    Check this answer by multiplying. We
    should get the identity matrix if we’ve
    found the inverse.

                 1     1 0
            AA
                       0 1
Inversion
We can use A-1 to solve a system of equations

x 3y 1            To see how, we can re-write a
                  system of equations as
2x 5 y 3          matrices.

                  Ax           b
     coefficien     variable     constant
      t matrix       matrix       matrix
       1 3            x            1
       2 5            y             3
Ax               b         left multiply both
                                 sides by the
                                 inverse of A
       1                1
  A Ax              A b
This is just the identity
                               but the identity
                   1           times a matrix just
    Ix        A b              gives us back the
                               matrix so we have:
This then gives us a formula
                                                      1
for finding the variable
matrix: Multiply A inverse            x       A b
by the constants.
x 3y 1                            1 3   find the
                            A
     2x 5 y 3                          2 5   inverse


         1 3 1 0                         1   3       1       0
         2 5 0 1             -           0    1       2 1
                             2r1+r2
     1 3 1      0           r 1-       1 0       5   3
                            3r2
-    0 1 2          1                  0 1    2          1
r2
     1      5   3       1       4        x       This is the
A b                                              answer to
            2   1 3                1     y       the system
Systems of Equations in Matrix Form
The system of linear equations          a11 x1 a12 x2 a13 x3  a1n xn b1
                                        a21 x1 a22 x2 a23 x3  a2 n xn b2
                                                      
                                        ak1 x1        ak 2 x2 ak 3 x3  akn xn bk
can be rewritten as the matrix equation Ax=b, where

                                 x1              b1
               a11  a1n
                                 x2              b2
           A       , x             , b              .
                                                
               ak1  akn
                                 xn              bk

If an n n matrix A is invertible, then it is nonsingular, and the unique
solution to the system of linear equations Ax=b is x=A-1b.
Example: solve the linear system       4x y 2z 4
                                       5x 2 y z 4
                                       x 3z 3

  Matrix Inversion
  AX      b
          d
         4 1 2              x      4
  A      5 2 1 ;X           y ;b   4
         1 0 3              z      3
  X      A 1b
                6   -3 -3
         1
  A -1     -14 10      6
         6
            -2 1       3
   x            6   -3 -3 4
          1
   y        -14 10      6   4
          6
   z         -2 1       3   3
  x 1 2; y 1 3; z 5 6
Matrix Inversion


    1                    1
B B                 BB               I

Like a reciprocal        Like the number one
in scalar math           in scalar math
Linear System of Simultaneous Equations


  First precinct: 6 arrests last week equally divided
  between felonies and misdemeanors.

  Second precinct: 9 arrests - there were twice as
  many felonies as the first precinct.

 1st Precinct :           x1        x2         6
 2nd Pr ecinct : 2x1                   x2          9
Solution                 Note:
                                            11
                                            21   i
                                                      11
                                                     2 1
                         Inverse of              s
      11           x1    6
               *
      21           x2    9
 11       11        x1       11       6    Premultiply both sides
      *        *                  *
2 1       21        x2   2 1          9    by inverse matrix

          10       x1    3            A square matrix
               *                      multiplied by its inverse
          01       x2    3
                                      results in the identity
                                      matrix.
                   x1    3            A 2x2 identity matrix
                   x2    3            multiplied by the 2x1
                                      matrix results in the
                                      original 2x1 matrix.
General Form
 n equations in n variables:
 n
     aijxj       bi     or     Ax            b
j 1

unknown values of x can be found using the
inverse of matrix A such that
                  1                          1
x            A Ax                    A b
Matrix Algebra Basics Explained
Matrix Algebra Basics Explained

More Related Content

What's hot

Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Rai University
 
Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)Matthew Leingang
 
Ppt presentasi matrix algebra
Ppt presentasi matrix algebraPpt presentasi matrix algebra
Ppt presentasi matrix algebraRahmatulFitri1
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Rwan Kamal
 
University of duhok
University of duhokUniversity of duhok
University of duhokRwan Kamal
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrixitutor
 
Matrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIAMatrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIADheeraj Kataria
 
March 18
March 18March 18
March 18khyps13
 

What's hot (16)

Matrix.
Matrix.Matrix.
Matrix.
 
Sub matrices - Circuit Matrix
Sub matrices - Circuit MatrixSub matrices - Circuit Matrix
Sub matrices - Circuit Matrix
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -
 
Matrix Algebra seminar ppt
Matrix Algebra seminar pptMatrix Algebra seminar ppt
Matrix Algebra seminar ppt
 
Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)
 
Presentation on matrix
Presentation on matrixPresentation on matrix
Presentation on matrix
 
Ppt presentasi matrix algebra
Ppt presentasi matrix algebraPpt presentasi matrix algebra
Ppt presentasi matrix algebra
 
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
Matrices and its Applications to Solve Some Methods of Systems of Linear Equa...
 
University of duhok
University of duhokUniversity of duhok
University of duhok
 
Matrices
MatricesMatrices
Matrices
 
Matrices & Determinants
Matrices & DeterminantsMatrices & Determinants
Matrices & Determinants
 
Introduction of matrices
Introduction of matricesIntroduction of matrices
Introduction of matrices
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
 
Matrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIAMatrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIA
 
March 18
March 18March 18
March 18
 
Determinants
DeterminantsDeterminants
Determinants
 

Similar to Matrix Algebra Basics Explained

Mathematics fundamentals
Mathematics fundamentalsMathematics fundamentals
Mathematics fundamentalsSardar Alam
 
Applied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdfApplied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdfPrasadBaravkar1
 
Introduction to Business Mathematics
Introduction to Business MathematicsIntroduction to Business Mathematics
Introduction to Business MathematicsZunair Bhatti
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matricesStudent
 
Linear_Algebra_Matrices.ppt
Linear_Algebra_Matrices.pptLinear_Algebra_Matrices.ppt
Linear_Algebra_Matrices.pptmemevoltage
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraMUHAMMADUSMAN93058
 
Linear Algebra for beginner and advance students
Linear Algebra for beginner and advance studentsLinear Algebra for beginner and advance students
Linear Algebra for beginner and advance studentsShamshadAli58
 
Module 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfModule 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfPrathamPatel560716
 
Brief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economicsBrief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economicsfelekephiliphos3
 
Matrices y determinants
Matrices y determinantsMatrices y determinants
Matrices y determinantsJeannie
 
Matrices & determinants
Matrices & determinantsMatrices & determinants
Matrices & determinantsindu thakur
 
Matrices and their applications
Matrices and their applicationsMatrices and their applications
Matrices and their applicationsZarghaam Abbas
 
Matrices and Determinants
Matrices and DeterminantsMatrices and Determinants
Matrices and DeterminantsSOMASUNDARAM T
 
Engg maths k notes(4)
Engg maths k notes(4)Engg maths k notes(4)
Engg maths k notes(4)Ranjay Kumar
 
Matrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMatrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMohammad Imran
 

Similar to Matrix Algebra Basics Explained (20)

Mathematics fundamentals
Mathematics fundamentalsMathematics fundamentals
Mathematics fundamentals
 
Applied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdfApplied Mathematics 3 Matrices.pdf
Applied Mathematics 3 Matrices.pdf
 
Introduction to Business Mathematics
Introduction to Business MathematicsIntroduction to Business Mathematics
Introduction to Business Mathematics
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
 
Linear_Algebra_Matrices.ppt
Linear_Algebra_Matrices.pptLinear_Algebra_Matrices.ppt
Linear_Algebra_Matrices.ppt
 
Linear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear AlgebraLinear Algebra Presentation including basic of linear Algebra
Linear Algebra Presentation including basic of linear Algebra
 
Maths 9
Maths 9Maths 9
Maths 9
 
LinearAlgebra.ppt
LinearAlgebra.pptLinearAlgebra.ppt
LinearAlgebra.ppt
 
LinearAlgebra.ppt
LinearAlgebra.pptLinearAlgebra.ppt
LinearAlgebra.ppt
 
Linear Algebra for beginner and advance students
Linear Algebra for beginner and advance studentsLinear Algebra for beginner and advance students
Linear Algebra for beginner and advance students
 
Introduction to matices
Introduction to maticesIntroduction to matices
Introduction to matices
 
Module 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfModule 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdf
 
Brief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economicsBrief review on matrix Algebra for mathematical economics
Brief review on matrix Algebra for mathematical economics
 
Matrix_PPT.pptx
Matrix_PPT.pptxMatrix_PPT.pptx
Matrix_PPT.pptx
 
Matrices y determinants
Matrices y determinantsMatrices y determinants
Matrices y determinants
 
Matrices & determinants
Matrices & determinantsMatrices & determinants
Matrices & determinants
 
Matrices and their applications
Matrices and their applicationsMatrices and their applications
Matrices and their applications
 
Matrices and Determinants
Matrices and DeterminantsMatrices and Determinants
Matrices and Determinants
 
Engg maths k notes(4)
Engg maths k notes(4)Engg maths k notes(4)
Engg maths k notes(4)
 
Matrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMatrix and its applications by mohammad imran
Matrix and its applications by mohammad imran
 

More from Nittaya Noinan

นำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมนำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมNittaya Noinan
 
แบบฝึกหัดเมทริกซ์
แบบฝึกหัดเมทริกซ์แบบฝึกหัดเมทริกซ์
แบบฝึกหัดเมทริกซ์Nittaya Noinan
 
โครงงานคณิตศาสตร์3
โครงงานคณิตศาสตร์3โครงงานคณิตศาสตร์3
โครงงานคณิตศาสตร์3Nittaya Noinan
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมNittaya Noinan
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมNittaya Noinan
 
นำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมนำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมNittaya Noinan
 
แบบฝึกหัดเรขาคณิตวิเคราะห์
แบบฝึกหัดเรขาคณิตวิเคราะห์แบบฝึกหัดเรขาคณิตวิเคราะห์
แบบฝึกหัดเรขาคณิตวิเคราะห์Nittaya Noinan
 
แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์Nittaya Noinan
 
แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์Nittaya Noinan
 
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้น
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้นแบบฝึกหัดทฤษฏีจำนวนเบื้องต้น
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้นNittaya Noinan
 
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริง
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริงแบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริง
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริงNittaya Noinan
 
แบบฝึกทักษะฟังก์ชันตัวจริง
แบบฝึกทักษะฟังก์ชันตัวจริงแบบฝึกทักษะฟังก์ชันตัวจริง
แบบฝึกทักษะฟังก์ชันตัวจริงNittaya Noinan
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมNittaya Noinan
 
แบบฝึกทักษะตรีโกณมิติตัวจริง
แบบฝึกทักษะตรีโกณมิติตัวจริงแบบฝึกทักษะตรีโกณมิติตัวจริง
แบบฝึกทักษะตรีโกณมิติตัวจริงNittaya Noinan
 
แบบฝึกหัดจำนวนจริงพื้นฐาน
แบบฝึกหัดจำนวนจริงพื้นฐานแบบฝึกหัดจำนวนจริงพื้นฐาน
แบบฝึกหัดจำนวนจริงพื้นฐานNittaya Noinan
 
แบบฝึกทักษะการให้เหตุผล
แบบฝึกทักษะการให้เหตุผลแบบฝึกทักษะการให้เหตุผล
แบบฝึกทักษะการให้เหตุผลNittaya Noinan
 
นำเสนอตรีโกณมิติจริง
นำเสนอตรีโกณมิติจริงนำเสนอตรีโกณมิติจริง
นำเสนอตรีโกณมิติจริงNittaya Noinan
 

More from Nittaya Noinan (20)

ตัวจริง
ตัวจริงตัวจริง
ตัวจริง
 
นำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมนำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติม
 
แบบฝึกหัดเมทริกซ์
แบบฝึกหัดเมทริกซ์แบบฝึกหัดเมทริกซ์
แบบฝึกหัดเมทริกซ์
 
โครงงานคณิตศาสตร์3
โครงงานคณิตศาสตร์3โครงงานคณิตศาสตร์3
โครงงานคณิตศาสตร์3
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติม
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติม
 
นำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติมนำเสนอจำนวนจริงเพิ่มเติม
นำเสนอจำนวนจริงเพิ่มเติม
 
The logic
The logicThe logic
The logic
 
แบบฝึกหัดเรขาคณิตวิเคราะห์
แบบฝึกหัดเรขาคณิตวิเคราะห์แบบฝึกหัดเรขาคณิตวิเคราะห์
แบบฝึกหัดเรขาคณิตวิเคราะห์
 
แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์
 
แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์แบบฝึกทักษะตรรกศาสตร์
แบบฝึกทักษะตรรกศาสตร์
 
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้น
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้นแบบฝึกหัดทฤษฏีจำนวนเบื้องต้น
แบบฝึกหัดทฤษฏีจำนวนเบื้องต้น
 
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริง
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริงแบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริง
แบบฝึกทักษะฟังก์ชัน(เพิ่มเติม)ตัวจริง
 
แบบฝึกทักษะฟังก์ชันตัวจริง
แบบฝึกทักษะฟังก์ชันตัวจริงแบบฝึกทักษะฟังก์ชันตัวจริง
แบบฝึกทักษะฟังก์ชันตัวจริง
 
แบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติมแบบฝึกหัดจำนวนจริงเพิ่มเติม
แบบฝึกหัดจำนวนจริงเพิ่มเติม
 
แบบฝึกทักษะตรีโกณมิติตัวจริง
แบบฝึกทักษะตรีโกณมิติตัวจริงแบบฝึกทักษะตรีโกณมิติตัวจริง
แบบฝึกทักษะตรีโกณมิติตัวจริง
 
แบบฝึกหัดจำนวนจริงพื้นฐาน
แบบฝึกหัดจำนวนจริงพื้นฐานแบบฝึกหัดจำนวนจริงพื้นฐาน
แบบฝึกหัดจำนวนจริงพื้นฐาน
 
แบบฝึกทักษะการให้เหตุผล
แบบฝึกทักษะการให้เหตุผลแบบฝึกทักษะการให้เหตุผล
แบบฝึกทักษะการให้เหตุผล
 
เซต
เซตเซต
เซต
 
นำเสนอตรีโกณมิติจริง
นำเสนอตรีโกณมิติจริงนำเสนอตรีโกณมิติจริง
นำเสนอตรีโกณมิติจริง
 

Matrix Algebra Basics Explained

  • 1. Matrix Algebra Basics by Nittaya Noinan Kanchanapisekwittayalai phechabun M.4
  • 3. Matrix Algebra • Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. • Often referred to as Linear Algebra • Many equations would be completely intractable if scalar mathematics had to be used. It is also important to note that the scalar algebra is under there somewhere.
  • 4. Matrix (Basic Definitions) An m × n matrix A is a rectangular array of numbers with m rows and n columns. (Rows are horizontal and columns are vertical.) The numbers m and n are the dimensions of A. The numbers in the matrix are called its entries. The entry in row i and column j is called aij . a11 , , a1n a21 , , a2 n A Aij ak 1 , , akn 4
  • 5. Matrix A matrix is any doubly subscripted array of elements arranged in rows and columns. a11 , , a1n a 21 , , a 2n A Aij am1 , , amn
  • 6. Definitions - Matrix • A matrix is a set of rows and columns of numbers 1 2 3 4 5 6 • Denoted with a bold Capital letter • All matrices (and vectors) have an order - that is the number of rows x the number of columns. • Thus A = 1 2 3 4 5 6 2x3
  • 7. Definitions - scalar • scalar - a number – denoted with regular type as is scalar algebra – [1] or [a]
  • 8. Definitions - vector • vector - a single row or column of numbers – denoted with bold small letters – row vector a = 1 2 3 4 5 – column vector x = x1 x2 x3 x4 x5
  • 9. Row Vector [1 x n] matrix A a1 a 2 , , an aj
  • 10. Column Vector [m x 1] matrix a1 a2 A ai am
  • 11. Special matrices • There are a number of special matrices – Square – Diagonal – Symmetric – Null – Identity
  • 12. Square matrix • A square matrix is just what it sounds like, an nxn matrix a11 a12 a13 a14 a21 a22 a23 a24 a31 a32 a33 a34 a41 a42 a43 a44 • Square matrices are quite useful for describing the properties or interrelationships among a set of things – like a data set.
  • 13. Square Matrix Same number of rows and columns 5 4 7 B 3 6 1 2 1 3
  • 14. Diagonal Matrices – A diagonal matrix is a square matrix that has values on the diagonal with all off-diagonal entities being zero. a11 0 0 0 0 a22 0 0 0 0 a33 0 0 0 0 a44
  • 15. Symmetric Matrix • All of the elements in the upper right portion of the matrix are identical to those in the lower left. • For example, the correlation matrix
  • 16. Identity Matrix • The identity matrix I is a diagonal matrix where the diagonal elements all equal one. It is used in a fashion analogous to multiplying through by "1" in scalar math. 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
  • 17. Null Matrix • A square matrix where all elements equal zero. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 • Not usually ‘used’ so much as sometimes the result of a calculation. – Analogous to “a+b=0”
  • 18. Types of Matrix • Identity matrices - I • Symmetric 1 0 0 0 ab c 10 0 1 0 0 bd e 01 0 0 1 0 c e f 0 0 0 1 – Diagonal matrices are (of • Diagonal course) symmetric – Identity matrices are (of 1 0 0 0 course) diagonal 0 2 0 0 0 0 1 0 0 0 0 4
  • 20. Identity Matrix Square matrix with ones on the diagonal and zeros elsewhere. 1 0 0 0 0 1 0 0 I 0 0 1 0 0 0 0 1
  • 21. Operations with Matrices (Transpose) Transpose The transpose, AT , of a matrix A is the matrix obtained from A by writing its rows as columns. If A is an k×n matrix and B = AT then B is the n×k matrix with bij = aji. If AT=A, then A is symmetric. Example: T a11 a21 a11 a12 a13 a12 a22 a21 a22 a23 a13 a23 It it easy to verify : (A B)T AT B T , (A B)T AT BT , (AT )T A, (rA)T rAT w here A and B are k n and r is a scalar. Let C be a k m matrix and D be an m n matrix. Then, (CD)T DT C T ,
  • 22. The Transpose of a Matrix At • Taking the transpose is an operation that creates a new matrix based on an existing one. • The rows of A = the columns of At • Hold upper left and lower right corners and rotate 180 degrees.
  • 23. Transpose Matrix Rows become columns and columns become rows a11 , a12, , a1n a11 , a 21 , , an1 a 21 , a 22, , a2n t a12 , a 22 , , an 2 A A am1 , am 2 , amn a1m, a 2 m , , anm
  • 24. Example of a transpose 1 4 t 1 2 3 A 2 5 ,A 4 5 6 3 6
  • 25. The Transpose of a Matrix At • If A = At, then A is symmetric (i.e. correlation matrix) • If A AT = A then At is idempotent – (and A' = A) • The transpose of a sum = sum of transposes • The transpose of a product = the product of the transposes in reverse order (A B C)t At Bt Ct
  • 26. Transpose Matrix Ex 1 1 2 T 1 3 1 A 3 0 A 1 4 2 0 4 (3 2) (2 3)
  • 27. Transpose Matrix Ex 2 4 1 4 3 4 0 2 B 0 1 3 1 B T 1 1 7 2 7 5 2 4 3 5 (3 4) 3 1 2 (4 3)
  • 28. Matrix Equality • Two matrices are equal iff (if and only if) all of their elements are identical • Note: your data set is a matrix.
  • 29. Matrix Equality Ex1. Assume A = B find x , y ,z 1 2 x 2 A 3 0 ,B 3 y 1 4 z 4 Solution. If A = B that mean x = 1 y = 0 z = -1
  • 30. Matrix Equality Ex2. Assume C = D find x , y ,z x y 1 4 3 4 1 4 3 C 0 1 3 1 ,D 0 1 3 1 2 7 5 2 y 7 5 z Solution. If C = D that mean y = 2 , z = 2 and x + y = 4 thus x + 2 = 4 then x = 2
  • 31. Matrix Operations • Addition and Subtraction • Multiplication • Transposition • Inversion
  • 32. Matrix Addition A new matrix C may be defined as the additive combination of matrices A and B where: C = A + B is defined by: Cij Aij Bij Note: all three matrices are of the same dimension
  • 33. Addition a11 a12 A If a 21 a 22 b11 b12 and B b 21 b 22 a11 b11 a12 b12 then C a 21 b 21 a 22 b22
  • 34. If A and B are both m n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. corresponding elements of A and B. add addadd add add these add these these 0 4 3 111 222 222these theseB these 33 300 0 44 4 AA 1 A 0 1 22 22 111 333 B B 2 33 00 444 B 1 B 2 21 1 4 4 A 00 A 0 B 2 1 4 11 33 2 1 4 0 2 1 4 2 2 22 22 6 A AA B BB 22 2 2 2 6 66 A AA B BB 2 0 1 22 0
  • 35. Matrix Addition Example 3 4 1 2 4 6 A B C 5 6 3 4 8 10
  • 36. A B B A A (B C) ( A B) C
  • 37. Addition and Subtraction (cont.) a11 b11 c11 • Where a12 b12 c12 a21 b21 c 21 a22 b22 c 22 a31 b31 c31 a32 b32 c32 • Hence 1 2 4 6 5 8 3 4 4 6 7 10 5 6 4 6 9 12
  • 38. Matrix Subtraction C = A - B Is defined by Cij Aij Bij Note: all three matrices are of the same dimension
  • 39. Subtraction a11 a12 A If a 21 a 22 b11 b12 and B b 21 b 22 then a11 b11 a12 b12 C a 21 b21 a 22 b22
  • 40. Addition and Subtraction (cont.) a11 b11 c11 • Where a12 b12 c12 a 21 b21 c 21 a 22 b22 c 22 a31 b31 c31 a32 b32 c32 • Hence 1 2 4 6 3 4 3 4 4 6 1 2 5 6 4 6 1 0
  • 41. Operations with Matrices (Scalar Multiple) Scalar Multiple If A is a matrix and r is a number (sometimes called a scalar in this context), then the scalar multiple, rA, is obtained by multiplying every entry in A by r. In symbols, (rA)ij = raij . Example: 3 4 1 6 8 2 2 6 7 0 12 14 0 41
  • 42. Scalar Multiplication • To multiply a scalar times a matrix, simply multiply each element of the matrix by the scalar quantity a11 a12 2a11 2a12 2 a21 a22 2a21 2a22
  • 43. If A is an m n matrix and s is a scalar, then we let kA denote the matrix obtained by multiplying every element of A by k. This procedure is called scalar multiplication. 1 2 2 31 3 2 3 2 3 6 6 A 3A 0 1 3 30 3 1 33 0 3 9 PROPERTIES OF SCALAR MULTIPLICATION k hA kh A k h A kA hA k A B kA kB
  • 44. The m n zero matrix, denoted 0, is the m n matrix whose elements are all zeros. 0 0 0 0 0 0 0 1 3 2 2 A 0 A A ( A) 0 0 A 0
  • 45. Operations with Matrices (Product) Product If A has dimensions k × m and B has dimensions m × n, then the product AB is defined, and has dimensions k × n. The entry (AB)ij is obtained by multiplying row i of A by column j of B, which is done by multiplying corresponding entries together and then adding the results i.e., b1 j b2 j ( ai1 ai 2 ... aim ) ai1b1 j ai 2b2 j ... aim bmj .  bmj Example a b aA bC aB bD A B c d . cA dC cB dD C D e f eA fC eB fD 1 0 0 0 1 0 Identity matrix I for any m n matrix A, AI A and for    0 0 1 n n any n m matrix B, IB B.
  • 46. Matrix Multiplication (cont.) • To multiply a matrix times a matrix, we write • A times B as AB • This is pre-multiplying B by A, or post- multiplying A by B.
  • 47. Matrix Multiplication (cont.) • In order to multiply matrices, they must be conformable (the number of columns in A must equal the number of rows in B.) • an (mxn) x (nxp) = (mxp) • an (mxn) x (pxn) = cannot be done • a (1xn) x (nx1) = a scalar (1x1)
  • 48. Matrix Multiplication (cont.) • The general rule for matrix multiplication is: N cij aik bkj where i 1,2,..., M , and j 1,2,..., P k 1
  • 49. Matrix Multiplication Matrices A and B have these dimensions: [r x c] and [s x d]
  • 50. Matrix Multiplication Matrices A and B can be multiplied if: [r x c] and [s x d] c=s
  • 51. Matrix Multiplication The resulting matrix will have the dimensions: [r x c] and [s x d] rxd
  • 52. Computation: A x B = C a11 a12 A [2 x 2] a 21 a 22 b11 b12 b13 B [2 x 3] b 21 b 22 b 23 a11b11 a12b21 a11b12 a12b22 a11b13 a12b23 C a 21b11 a 22b21 a 21b12 a 22b22 a 21b13 a 22b23 [2 x 3]
  • 53. Computation: A x B = C 2 3 111 A 11 and B 1 0 2 1 0 [3 x 2] [2 x 3] A and B can be multiplied 2 *1 3 *1 5 2 *1 3 * 0 2 2 *1 3 * 2 8 528 C 1*1 1*1 2 1*1 1* 0 1 1*1 1* 2 3 213 1*1 0 *1 1 1*1 0 * 0 1 1*1 0 * 2 1 111 [3 x 3]
  • 54. Computation: A x B = C 2 3 111 A 11 and B 1 0 2 1 0 [3 x 2] [2 x 3] Result is 3 x 3 2 *1 3 *1 5 2 *1 3 * 0 2 2 *1 3 * 2 8 528 C 1*1 1*1 2 1*1 1* 0 1 1*1 1* 2 3 213 1*1 0 *1 1 1*1 0 * 0 1 1*1 0 * 2 1 111 [3 x 3]
  • 55. The multiplication of matrices is easier shown than put into words. You multiply the rows of the first matrix with the columns of the second adding products Find AB 2 4 3 2 1 A B 1 3 0 4 1 3 1 3 22 3 22 11 1 3 5 First we multiply across the first row and down the first column adding products. We put the answer in the first row, first column of the answer.
  • 56. Find AB 2 4 3 2 1 A B 1 3 0 4 1 3 1 5 77 5 7 AB AB 0034 4 442313 3 1 1 3 11 1 0 24 4 3 3 4 0 2 2 1 1 7 1 1 11 Notice the sizes of A and B and the size of the product AB. Now we multiplyacross first first androw and down Now we multiply across the row rowrow and down We multiplied across the second down first the second and down the second column we’ll put the the answerthe the second column andand we’ll put answer inrow, first the first column and the answer inanswer in the column so we put we’ll put the the first in second row, first column. row, second second column. second row, column. first column.
  • 57. To multiply matrices A and B look at their dimensions m n n p MUST BE SAME SIZE OF PRODUCT If the number of columns of A does not equal the number of rows of B then the product AB is undefined.
  • 58. Now let’s look at the product BA. 2 4 3 2 1 A B 1 3 0 4 1 3 1 3221 2 2 3 14340 4 102 1111 3 21 3 404 943 323 1 011 612 4 14 3 2 2 3 across third row 66 12 6 12 6 12 12 222 2 as we first row acrossgo down across first row third row second third asgodown as wecoluacross row we go as wego down BA BA BA BA 33 14 BA 3 14 14 44 4 first column: as secondrow secondfirst first second downcolumn: thirdcolumn: column: we go down column: column: 9 10 9 10 4 Commuter's Beware! third column: mn: Completely different than AB! AB BA
  • 59. PROPERTIES OF MATRIX MULTIPLICATION A BC AB C A B C AB AC A B C AC BC AB BA Is it possible for AB = BA ? ,yes it is possible.
  • 60. 2 1 2 Multiplying a What is AI? 0 1 5 A matrix by the 1 20 3 0 2 identity gives the matrix back I3 2 011 0 2 again. What is IA? 0 1 5 A 1 0 0 2 1 2 2 020 1 3 A 0 1 5 I3 0 1 0 2 2 3 0 0 1 an n n matrix with ones on the main diagonal and zeros elsewhere
  • 61. Matrix multiplication is not Commutative • AB does not necessarily equal BA • (BA may even be an impossible operation)
  • 62. Yet matrix multiplication is Associative • A(BC) = (AB)C
  • 63. Laws of Matrix Algebra • The matrix addition, subtraction, scalar multiplication and matrix multiplication, have the following properties. Associative Laws : A (B C) (A B) C, (AB)C A(BC). Commutative Law for Addition : A B B A Distributive Laws : A(B C) AB AC, (A B)C AC BC.
  • 64. An example - cont • Since the matrix product is a scalar found by summing the elements of the vector squared.
  • 65. Determinants • Determinant is a scalar – Defined for a square matrix – Is the sum of selected products of the elements of the matrix, each product being multiplied by +1 or -1 a11 a12  a1n a21 a22  a2 n n i j n det( A) aij ( 1) M ij aij ( 1)i j M ij     j 1 i 1 an1 an 2  ann • Mij=det(Aij), Aij is the (n-1) (n-1) submatrix obtained by deleting row i and column j from A.
  • 66. Determinants a b • The determinant of a 2 ×2 matrix A is det( A) ad bc c d • The determinant of a 3 ×3 matrix is a11 a12 a13 11 a22 a23 1 2 a21 a23 13 a21 a22 a21 a22 a23 a11 ( 1) a12 ( 1) a13 ( 1) a32 a33 a31 a33 a31 a32 a31 a32 a33  Example 1 2 3 5 6 4 6 4 5 4 5 6 1( 1)1 1 2( 1)1 2 3( 1)1 3 8 10 7 10 7 8 7 8 10 50 48 2(40 42) 3(32 35) 3 • In Matlab: det(A) = det(A)
  • 67. The Determinant of a Matrix • The determinant of a matrix A is denoted by |A|. • Determinants exist only for square matrices. • They are a matrix characteristic, and they are also difficult to compute
  • 68. The Determinant for a 2x2 matrix • If A = a11 a12 a21 a22 • Then A a11a22 a12a21 • That one is easy
  • 69. The Determinant for a 3x3 matrix • If A = a11 a12 a13 a21 a22 a23 a31 a32 a33 • Then A a11a22a33 a11a23a32 a12a23a31 a12a21a33 a13a21a32 a13a22a31
  • 70. Determinants • For 4 x 4 and up don't try. For those interested, expansion by minors and cofactors is the preferred method. • (However the spaghetti method works well! Simply duplicate all but the last column of the matrix next to the original and sum the products of the diagonals along the following pattern.)
  • 71. Properties of Determinates • Determinants have several mathematical properties which are useful in matrix manipulations. – 1 |A|=|A'|. – 2. If a row of A = 0, then |A|= 0. – 3. If every value in a row is multiplied by k, then |A| = k|A|. – 4. If two rows (or columns) are interchanged the sign, but not value, of |A| changes. – 5. If two rows are identical, |A| = 0.
  • 72. Properties of Determinates – 6. |A| remains unchanged if each element of a row or each element multiplied by a constant, is added to any other row. – 7. Det of product = product of Det's |AB| = |A| |B| – 8. Det of a diagonal matrix = product of the diagonal elements
  • 73. Matrix Division We have seen that for 2x2 (“two by two”) matrices A and B then AB BA To divide matrices we need to define what we mean by division! With numbers or algebra we use b/a to solve ax=b. The equivalent in 2x2 matrices is to solve AX=B where A, B and X are 2x2 matrices.
  • 74. Inverse Matrix In numbers, the inverse of 3 is 1/3 = 3-1 In algebra, the inverse of a is 1/a = a-1 In matrices, the inverse of A is A-1 3-1 is defined so that 3 x 3-1 = 3-1 x 3 = 1 a-1 is defined so that a x a-1 = a-1 x a = 1 A-1 is defined so that A A-1 = A-1 A = I However, for a square matrix A there is not always an inverse A-1
  • 75. Inverse Matrix In matrices, the inverse of A is A-1 A-1 is defined so that A A-1 = A-1 A = I However, for a square matrix A there is not always an inverse A-1 If A-1 does not exist then the matrix is said to be singular If A-1 does exist then the matrix is said to be non-singular
  • 76. Inverse Matrix In matrices, the inverse of A is A-1 A-1 is defined so that A A-1 = A-1 A = I A square matrix A has an inverse if, and only if, A is non-singular. If A-1 does exist the the solution to AX=B is X = A-1 B
  • 77. Inverse Matrix A-1 is defined so that A A-1 = A-1 A = I If A-1 does exist the the solution to AX=B is AX = B Pre-multiply by A-1 A-1AX = A-1B But A-1A = I so IX = A-1B X = A-1B
  • 78. Inverse Matrix AX = B Pre-multiply by A-1 A-1AX = A-1B But A-1A = I so IX = A-1B X = A-1B If the inverse of A is A-1 then the inverse of A-1 is A. This is because if AC = I then CA = I, and also any matrix inverse is unique.
  • 79. Inverse Matrix If the inverse of A is A-1 then the inverse of A-1 is A. This is because if AC = I then CA = I, and also any matrix inverse is unique. 2 1 B 0 3 What is the inverse of 1 u v let B 1 1 3 1 w x B 6 0 2 Then solve for u, v, w, x
  • 80. General Inverse Matrix a b 1 u v 1 d b C let C c d w x D c a where D ad bc au bw 1 c acu bcw c cu dw 0 a cau daw 0 av bx 0 Subtract : cv dx 1 (ad bc) w c
  • 81. Inverse of a Matrix • Definition. If A is a square matrix, i.e., A has dimensions n×n. Matrix A is nonsingular or invertible if there exists a matrix B such that AB=BA=In. For example. 2 1 2 1 1 1 1 1 3 3 3 3 3 3 1 0 1 2 1 1 2 2 1 2 0 1 3 3 3 3 3 3  Common notation for the inverse of a matrix A is A-1  The inverse matrix A-1 is unique when it exists.  If A is invertible, A-1 is also invertible  A is the inverse matrix of A-1. (A-1)-1=A. • Matrix division:  If A is an invertible matrix, then (AT)-1 = (A-1)T A/B = AB-1 • In Matlab: A-1 = inv(A)
  • 82. Calculation of Inversion using Determinants Def: For any n n matrix A, let Cij denote the (i,j)th cofactor of A, that is, (-1)i+j times the determinant of the submatrix obtained by deleting row i and column j form A, i.e., Cij = (-1)i+j Mij . The n n matrix whose (i,j)th entry is Cji, the (j,i)th cofactor of A is called the adjoint of A and is written adj A. Thm: Let A be a nonsingular matrix. Then, 1 A-1 adj A. det A thus
  • 83. Calculation of Inversion using Determinants 2 4 5 Example: find the inverse of the matrix A 0 3 0 Solve: 1 0 1 3 0 0 0 0 3 C11 3, C12 0, C13 3, 0 1 1 1 1 0 4 5 2 5 2 4 C21 4, C22 3, C23 4, 0 1 1 1 1 0 4 5 2 5 2 4 C31 15, C32 0, C33 6, 3 0 0 0 0 3 det A 9, C11 C21 C31 3 4 15 adjA C12 C22 C32 0 3 0 . C13 C23 C33 3 4 6 3 4 15 So, A 1 1 0 3 0 . thus Determinants to find the Using 9 inverse of a matrix can be very 3 4 6 complicated. Gaussian elimination is more efficient for high dimension matrix.
  • 84. Calculation of Inversion using Gaussian Elimination  Elementary row operations: o Interchange two rows of a matrix o Change a row by adding to it a multiple of another row o Multiply each element in a row by the same nonzero number • To calculate the inverse of matrix A, we apply the elementary row operations on the augmented matrix [A I] and reduce this matrix to the form of [I B] • The right half of this augmented matrix B is the inverse of A
  • 85. Calculation of inversion using Gaussian elimination a11 , , a1n a11 , , a1n 1 0  0 a21 , , a2 n a21 , , a2 n 0 1 0 A [A I] an1 , , ann an1 , , ann 0 0 1 I is the identity matrix, and use Gaussian elimination to obtain a matrix of the form 1 0  0 b11 b12 b1n 0 1 0 b21 b22 b2 n 0 0  1 bn1 bn 2 bnn The matrix b11 b12 b1n b21 b22 b2 n B is then the matrix inverse of A bn1 bn 2 bnn
  • 86. Example 1 1 1 1 1 1 |1 0 0 A 12 2 3 [A| I] 12 2 3 | 0 1 0 3 4 1 3 4 1 |0 0 1 (ii)+(-12) (i), (iii)+(-3) (i), (iii)+(ii) 3 1 (1/10) 1 0 0 | 0.4 1 1 1 | 1 0 0 35 7 2 3 0 10 15 | 12 1 0 0 1 0 | 0.6 35 7 0 0 3.5 | 4.2 0.1 1 1 2 0 0 1 | 1.2 35 7 3 1 The matrix 0.4 35 7 is then the matrix inverse of A 2 3 0.6 35 7 1 2 1.2 35 7
  • 87. Can we find a matrix to multiply the first matrix by to get the identity? 1 3 1 1 1 0 ? 32 4 2 2 0 1 2 1 1 3 1 1 0 2 3 4 2 0 1 2 2 Let A be an n n matrix. If there exists a matrix B such that AB = BA = I then we call this matrix the inverse of A and denote it A-1.
  • 88. If A has an inverse we say that A is nonsingular. If A-1 does not exist we say A is singular. To find the inverse of a matrix we put the matrix A, a To find the inverse of a matrix we put the matrix A, a line and then the identity matrix. We then perform row line and then the identity matrix. We then perform row operations on matrix A to turn it into the identity. We operations on matrix A to turn it into the identity. We carry the row operations across and the right hand side carry the row operations across and the right hand side will turn into the inverse. inverse. 1 3 A 2 7 1 3 1 0 1 3 1 0 2 7 0 1 r2 0 1 2 1 1 3 1 0 r 1 r2 1 0 7 3 2r1+r 0 1 2 1 0 1 2 1
  • 89. 1 3 7 3 A A 1 2 7 2 1 Check this answer by multiplying. We should get the identity matrix if we’ve found the inverse. 1 1 0 AA 0 1
  • 91. We can use A-1 to solve a system of equations x 3y 1 To see how, we can re-write a system of equations as 2x 5 y 3 matrices. Ax b coefficien variable constant t matrix matrix matrix 1 3 x 1 2 5 y 3
  • 92. Ax b left multiply both sides by the inverse of A 1 1 A Ax A b This is just the identity but the identity 1 times a matrix just Ix A b gives us back the matrix so we have: This then gives us a formula 1 for finding the variable matrix: Multiply A inverse x A b by the constants.
  • 93. x 3y 1 1 3 find the A 2x 5 y 3 2 5 inverse 1 3 1 0 1 3 1 0 2 5 0 1 - 0 1 2 1 2r1+r2 1 3 1 0 r 1- 1 0 5 3 3r2 - 0 1 2 1 0 1 2 1 r2 1 5 3 1 4 x This is the A b answer to 2 1 3 1 y the system
  • 94. Systems of Equations in Matrix Form The system of linear equations a11 x1 a12 x2 a13 x3  a1n xn b1 a21 x1 a22 x2 a23 x3  a2 n xn b2  ak1 x1 ak 2 x2 ak 3 x3  akn xn bk can be rewritten as the matrix equation Ax=b, where x1 b1 a11  a1n x2 b2 A    , x , b .   ak1  akn xn bk If an n n matrix A is invertible, then it is nonsingular, and the unique solution to the system of linear equations Ax=b is x=A-1b.
  • 95. Example: solve the linear system 4x y 2z 4 5x 2 y z 4 x 3z 3 Matrix Inversion AX b d 4 1 2 x 4 A 5 2 1 ;X y ;b 4 1 0 3 z 3 X A 1b 6 -3 -3 1 A -1 -14 10 6 6 -2 1 3 x 6 -3 -3 4 1 y -14 10 6 4 6 z -2 1 3 3 x 1 2; y 1 3; z 5 6
  • 96. Matrix Inversion 1 1 B B BB I Like a reciprocal Like the number one in scalar math in scalar math
  • 97. Linear System of Simultaneous Equations First precinct: 6 arrests last week equally divided between felonies and misdemeanors. Second precinct: 9 arrests - there were twice as many felonies as the first precinct. 1st Precinct : x1 x2 6 2nd Pr ecinct : 2x1 x2 9
  • 98. Solution Note: 11 21 i 11 2 1 Inverse of s 11 x1 6 * 21 x2 9 11 11 x1 11 6 Premultiply both sides * * * 2 1 21 x2 2 1 9 by inverse matrix 10 x1 3 A square matrix * multiplied by its inverse 01 x2 3 results in the identity matrix. x1 3 A 2x2 identity matrix x2 3 multiplied by the 2x1 matrix results in the original 2x1 matrix.
  • 99. General Form n equations in n variables: n aijxj bi or Ax b j 1 unknown values of x can be found using the inverse of matrix A such that 1 1 x A Ax A b