You are on page 1of 22

Matrix Algebra

MATRICES
Definition 1: A matrix is a rectangular array of numbers. The general form of a matrix A with m rows and n columns is
a1 1 a A = 21 . am1 a1 2 a2 2 . am 2 . a1n a2 n . am n

The aij ' s are called the elements (or entries) of the matrix. Note that aij is the element in the ith row and the jth column of the matrix A. The matrix A is sometimes denoted by ! aij m , n or sim"ly ! aij . A matrix that has m rows and n columns is called an m n (read #m by n$) matrix or a matrix of order m n. Example 1:
1 1 1 )
* ' 1

1 is a 2 2 matrix% 1 + (
* ( +

2 '

* is a 2 ) matrix% &

' 2 is a ' ' matrix% +

12 1' 2 *

( 1+ & , )

2 1 ' is a - ' matrix. * 1+

Equalit of Matri!es
Definition ": Two matrices A and B are said to be equal# written A . B, if they are of the same order and all the corres"onding elements are e/ual% that is, aij = bij for all i and j. 0y the notation A B, we mean that A is not e/ual to B. Example ": 1i2en the matrices
2 A= 2 2 , 2 2 B= 2 2 2 2 , 2
A C,

2 2 2 C= , and D = 2 2 2 B C , B D, and C D.

2 , we see that A = D, but A B, 2

MATRI$ %&ERATI%'S Matrix Addition


3atrices can be added if and only if they are of the same order. The matrices are then said to be !onformable for addition. Definition (: 4f
a1 1 a A = 21 . am1 a1 2 a2 2 . am 2 . a1n a2 n . am n

and
b1 1 b B = 21 . bm1 b1 2 b2 2 . bm2 . b1n b2n . bm n

then matrix addition is defined by


a11 + b11 a + b A + B = 21 21 . am1 + bm1 a12 + b12 a22 + b22 . am 2 + bm 2 . a1n + b1n a2 n + b2 n . am n + bm n

or, more concisely,

' A + B = ! aij +!bij = ! aij + bij

m,n

m,n

m, n

4n other words, the sum of two m n matrices is another m n matrix whose elements are obtained by adding corres"onding elements in the original matrices. Example (: 4f A = ) Solution: 5e ha2e
2 + ' A+ B = ) +1 1 + 2 = + + ) + ' ' ) * , find A + B. 1 2 1 ' and B = + 1 2 , find A + B. )

Example ): 4f A = + Solution: 5e ha2e

2 )

' ' and B = - 2

1+ ' A+ B = + + 2
' Example *: 4f C = ' 2 * +

2+ + ) + ( ')
) ( and D = + + +

' + ( *) ) = - + 1 2
' * +

2 1

' *

( 2 , find C + D. )

Solution: 5e ha2e
'+ + C+D= - + (-) '+ + 2+' * + ( *) ++ + ) + ( ( + 2 = + + ( )) ' + ' + + ) 1+ )

1 Example +: 4f A = '

+ 2 and B = ) 2

1 ' , find A + B. 1

Solution: The sum A + B is not defined since the matrices are not of the same order.

S!alar Multipli!ation
1 matrix) is referred to as a s!alar when it Definition ): A number (which is a 1 occurs in o"erations in2ol2ing matrices.

Definition *: 1i2en a matrix

a1 1 a A = 21 . am1

a1 2 a2 2 . am 2

a1n a2 n . am n

and a scalar k, then


ka11 ka kA = 21 . kam1 ka1 2 ka2 2 . kam 2 . ka1n ka2n . k am n

or, more concisely,


kA = k ! aij
m, n

= ! ka ij

m, n

4n other words, a matrix may be multi"lied by a scalar by multi"lying e2ery element of the matrix by the scalar. Example ,: 4f A = 1 Solution: 5e ha2e
2 ' 2A = 2 1
) Example -: 4f B = ( 1

'

2 +

) , find 2A. 2

2 2 2 +

2 ) * = 2 ( 2) 2

) +

( )

' 2 'B. , find +

Solution: 5e ha2e
' ) 'B = '( ' (1) ' (') 12 ' ( 2) = 2) ' + ' & * +

Matrix Multipli!ation
Definition +: 6et A be an m p matrix and B be a p n matrix. The produ!t C = AB is an m n matrix where each element cij of C is obtained by multi"lying corres"onding elements of the ith row of A by those of the jth column of B and then adding the results. Thus,

cij = ai1b1 j + ai 2b2 j + + aip bpj

The condition that A be m p and B be p n is e/ui2alent to saying that the number of columns of A must be e/ual to the number of rows of B. The matrix "roduct AB is defined if and only if the number of columns of A is e/ual to the number of rows of B. The matrices A and B are then said to be !onformable for multipli!ation# and the "roduct matrix has the same number of rows as A and the same number of columns as B. 4f the number of columns of A is not e/ual to the number of rows of B, then the "roduct AB is not defined. Example .: 4f A = '
1 2 and B = ) 1 + 1 , find AB . 2

Solution: 7ince A is a 2 2 matrix and B is a 2 2 matrix, the "roduct AB is defined and is a 2 2 matrix. 5e ha2e
1 AB = '
1 Example 1/: 4f A = 2 +

2 )
' + 1

1 +

1 = 2

1 1 + 2 + ' 1 + ) +

1 1 + 2 2 = ' 1 + ) 2

1 '

- 11

1 1 + and B = 1 * 1

+ 2 , find AB. '

Solution: 7ince A is a ' ' matrix and B is a ' 2 matrix, the "roduct AB is defined and is a ' 2 matrix. 5e ha2e
1 AB = 2 + ' + 1 1 + * 1 1 1 + 2 ' 1 + +' 2 + ( 1) ' 2 + + + 2 + + ' + + +( 1) 2 + * '

1) + ( 1) 1 1 1 +' ( = 1) ++ 1 2 1 + + ( 1) ( 1) +* 1 + 1 + ( ' = 2 , ' + 1*

2 Example 11: 4f C = ) *

1 ' * D. and D = 2, find C 2

Solution: 5e ha2e
2 CD = ) * 1 * 2 2 ' + 1 (2) ) ' 2 = ) ' + * (2) = + * ' + 2 (2) 1)

4n matrix multi"lication, the se/uence in which multi"lication is "erformed is im"ortant. 4f A is an m n matrix and B is an n m matrix, then it is "ossible to obtain both of the "roduct matrices AB and BA. 8owe2er, in general, AB BA , that is, matrix multi"lication is not commutati2e. 4n the matrix "roduct AB, A is said to premultipl B or, alternati2ely, B is said to postmultipl A. Example 1": 4f A = ' Solution: 5e ha2e
2 AB = ' 1 1 2 1 1 2 (2) + ( 1) 1 = ) ' ( 2) + 1 1 2 1 + ( 1) ) = ' 1 + 1 ) 2 ,
2 1 2 and B = 1 1 1 , find AB and BA. )

and
2 BA = 1 1 2 ) ' 1 2 2 + 1 ' = 1 1 2 + ) ' 2 ( 1) + 1 1 1 = 1 ( 1) + ) 1 1) ' '

Notice that although AB and BA are defined, AB BA.


1 Example 1(: 4f A = + ( 1+
' and B = 1 ) + * + , find AB and BA. '

Solution: 9roceeding as before, we ha2e


1 AB = + ( 1+ ' ) 1 + * + ' 1 ( *) + ( + + ( ') ' + ( *) +1+ + + ( )) '

1 - + ( ( 1) + ( ') + = + - +1+ ( 1) + ()) + 1' = 1+ ' 12

and

,
* 1 + + '

BA = 1 +

( 1+

' ) - ( ') + ( *) ( )) 1 ( ') + + ( )) + ( ') + ' ( ))

1) + ( *) + - ( = 1) + + + 1 ( + ( 1) + ' + = 1 + 2+ ( '+

- ( + ( *) 1+ 1 ( + + 1+ + ( + ' 1+ & ' 12

Notice again that AB BA.

S&ECIA0 MATRICES Square Matri!es


Definition ,: A matrix with the same number of rows as columns is called a square matrix. A s/uare matrix with n rows and n columns is said to be of order n, and is called an n-square matrix. Example 1):
1 )
2 + 1

' is a s/uare matrix of order 2% 2


' 2 1 2 is a s/uare matrix of order '% )

+ 2 + -

+ ) + )

+ 1 + 1

+ ' is a s/uare matrix of order ). + (


n, n

Definition -: The main diagonal of a s/uare matrix A = !aij


a11 , a 22 , . . . , a nn .

consists of the elements

Example 1*: The main diagonal of the matrix


2 1 ' )

consists of the numbers 2 and ).

Example 1+: The main diagonal of the matrix


' ) , + ( & 1

consists of the numbers -, ,, and 1.

Identit Matri!es
Definition .: 4f all the elements that are not on the main diagonal of a s/uare matrix are +:s and all the elements on the main diagonal are 1:s, then the matrix is called the identit matrix. Thus A = !aij n , n is an identity matrix if and only if aij = + for i j and aij =1 for i = j. An n n identity matrix is denoted by I n or, sim"ly, I. Example 1,: The 2 2 identity matrix is
1 I2 = +
' identity matrix is The '

+ 1

1 I' = + +

+ 1 +

+ + 1

The ) ) identity matrix is


1 + I) = + + + 1 + + + + 1 + + + + 1

T1eorem 1: 4f A and I are matrices such that AI and IA are defined, then

AI = A and IA = A

Transpose of a Matrix
Definition 1/: The transpose of an m n matrix A, denoted At , is an n m matrix that is formed by interchanging corres"onding rows and columns of A. The ith row of A becomes the ith column of At for i =1, 2, . . . , m. Thus, if

&

a1 1 a A = 21 . am1

a1 2 a2 2 . am 2

a1n a2 n . am n

then
a1 1 a At = 1 2 . a1n a2 1 a2 2 . a2 n . am1 am 2 . am n

3ore com"actly, if
A =! a ij
m,n

then
A t = !a ji
1 Example 1-: 4f A = 2 ' , t ( , find A . &
n,m

Solution:
1 At = ,
* Example 1.: 4f A = 2 '+ ( + )+

2 (

' &

1+ t , , find A . +

Solution:
* A = ( 1+
t

2 + ,

'+ )+ +

DETERMI'A'TS
Definition 11: The determinant of a s/uare matrix A is a uni/ue scalar (number) that is a function of all the elements in the matrix. The determinant of A is denoted by A or det A.

1+

1 matrix Definition 1": The determinant of a 1

A = ! a11

is gi2en by
A = a11

Example

"/:

4f

A = !12 ,

then

A =1 2

=1 2

and

if

B =! ,,

then

B = , = ,.

Definition 1(: The determinant of a 2 2 matrix


a A = 11 a21 a12 a22

is gi2en by
A = a11 a 22 a12 a 21

That is, the determinant of a 2 2 matrix is obtained by ta;ing the "roduct of the elements on the main diagonal and subtracting from it the "roduct of the elements on the other diagonal. Example "1: 4f A = 2 Solution:
A = 1 2 * =1 - * 2 = - 12 = ,

* , find -

A .

Example "": 4f A = & Solution:


A = 2 &

' , find )

A .

' )

= 2 ( )) ' ( &) = ( + 2, =1&

' matrix Definition 1): The determinant of a '

a1 1 A= a2 1 a' 1 is gi2en by

a1 2 a2 2 a' 2

a1 ' a2 ' a' '

11

A = a11 a 22 a'' a11 a 2' a '2 a12 a 21 a'' + a12 a 2' a'1 + a1' a 21 a'2 a1' a 22 a'1

Notice that there are six "roducts, each "roduct consisting of three elements of the original matrix. Three of the "roducts are "receded by "lus signs and three of the "roducts are "receded by minus signs.
1 Example "(: 4f A = 2 1 2 ) ' 1 , find 2

A .

Solution:
1 A = 2 1 2 ) ' 1 2

=1 ) ( 2) 1 ( 1) - ( 2) 2 ( 2) + ( 2) ( 1) 1 +' 2 - ' ) 1 = ( + - ( + 2 + '+ 12 = &

Minors and Cofa!tors


Definition 1*: 6et M ij denote the determinant of the ( n 1) ( n 1) matrix obtained by deleting the ith row and jth column of an n n matrix A. Then M ij is called the minor of the element aij of the matrix A.
2 Example "): 4f A = ( ' * & ) , , find M 12 and M 2' . 1

Solution: 5e ha2e
M 12 = ( 2 ( , 1 ' & =- * = 1

M 2' =

=1 ( 2) = *

Definition 1+: The !ofa!tor Cij of the element aij of the n n matrix A is the 1) i +j and the minor of aij % that is, "roduct of (
Cij = ( 1)i + j M ij
2 ' A = Example "*: 4f 2 1 + 1 ' - , find C11 and C 21 . 1

12

Solution:
1 C11 =( 1) 1+

+ 1 1 1

1 ' 1

= 1 (+ +-) =-

1 C 21 =( 1) 2 +

=( 1) ( 1 ') =)

Expansion b Cofa!tors
The determinant of a matrix A can be obtained by a "rocedure ;nown as expansion b !ofa!tors. To find the determinant of an n n matrix A, select any row (or column) of A and multi"ly each element in the row (or column) by its cofactor. The sum of these "roducts gi2es the determinant of A. This result is summari<ed in the following theorem. T1eorem ": 4f A =! aij
n,n

then
i =1, 2, . . . , n

A = ai1C i1 + a i 2 C i 2 + + a in C in ,

or
A = a1 j C1 j + a 2 j C 2 j + + a nj C nj , j =1, 2, . . . , n

The abo2e formulas for A are called the ex"ansions of the determinant of A around the ith row and jth column, res"ecti2ely.
12 Example "+: 4f A = ' 1+ 1 1 2 ' 1 , find '

A .

Solution: =x"anding about the first row, we ha2e


1 A =1 2 ( 1) 1+

1 2

1 ' +( 1) ( 1) 1+2 ' 1 +

1 ' +' ( 1) 1+' ' 1 +

1 2

=1 2 1 ( 1) +( 1) ( 1) ( 1) +' 1 ) = 1 2 1+ 1 2 = 1

+ Example ",: 4f A = 2 +

1 ' 1

1 2 , find '

A .

Solution: 7ince column 1 has two <ero elements, it is con2enient to ex"and about this column to get
A = + + 2 ( 1) 2 +1 1 1 1 ' + + = 2 ( 1) ) = (

1'

T2E I'3ERSE MATRI$


Definition 1,: 4f for a gi2en n n matrix A there is another n n matrix B such that

AB = BA = I
then B is said to be the in4erse of A and is written B = A 1 >bser2e that the abo2e relation is symmetric% that is, if B is the in2erse of A, then A is the in2erse of B. An n n matrix A is said to be in4ertible (or nonsingular) if A1 exists and nonin4ertible (or singular) if A1 does not exist. Example "-: 6et A = '
1 2 , and B = , ' 1 AB = ' 2 , , ' 2 . Then 1 2 1 = 1 + + =I 1

and
, BA = ' 2 1 1 ' 2 1 = , + + =I 1

Thus B is the in2erse of A. 4n =xam"le 2(, we showed that both AB and BA are e/ual to I. 8owe2er, it can be shown that AB = I if and only if BA = I . 8ence it is necessary to find only one "roduct to determine if one matrix is the in2erse of another.
1 Example ".: 6et A = 2 ) 1 AB = 2 ) + 1 1 + 1 1 2 ' and B = ( 2 ' ( 11 ) * 11 ) * 2 + 1 2 + 1 2 1 1 = + 1 + 2 1 . Then 1 + 1 + + + =I 1

Thus B is the in2erse of A.

Cofa!tor and Ad5oint Matri!es


Definition 1-: 6et A = !aij n , n , where n 2. The !ofa!tor matrix of A# denoted cof A, is the n n matrix obtained by re"lacing each element aij in A by its cofactor Cij . Thus

1)

C11 C co f A = 21 . Cn1
2 + A = Example (/: 4f 1 ' ) 1

C12 C22 . Cn 2

C1n C2 n . Cnn

) 2 , find cof A. -

Solution: The cofactors of the nine elements of A are


1 C1 ( 1) 1+ 1 =

) 1 + 1 + 1 ' 1 2 1 2 1 ' ) 2 + 2 +

2 = 1 ( 2 = 2 ) = ) 1 ) = 1 1 ) = 1 ) ' = 1 ) = 1 + 2 ) = ) 2 ' = ( )

2 C1 ( 1) 1+ 2 =

' C1' = ( 1) 1+

1 C2 ( 1) 2 + 1 =

2 C2 ( 1) 2 + 2 =

' C 2' = ( 1) 2 +

1 C' ( 1) '+ 1 =

2 C' ( 1) '+ 2 =

' C '' = ( 1) '+

Thus
1( cof A = 11 1+ 2 1) ) ) - (

Definition 1.: 6et A = !aij n , n , where n 2. The ad5oint matrix of A# denoted ad? A, is the trans"ose of the cofactor matrix of A% that is,
ad? A = (cof A) t
2 Example (1: 4f A = + 1 ' ) 1 ) 2 , find ad? A. -

1-

Solution: @rom =xam"le '+,


1( cof A = 11 1+ 2 1) ) ) - (

Thus
1( ad? A = (cof A) = 2 )
t

11 1) -

1+ ) (

In4erse of an n n Matrix
T1eorem (: 6et A = !aij
n, n

where n 2. 4f A is in2ertible, then


A 1 = 1 ad? A A

The condition for a matrix to be in2ertible is gi2en in the following theorem. T1eorem ): An n n matrix A is in2ertible if and only if
2 Example (": 4f A = + 1 ' ) 1 ) 1 2 , find A . -
A +.

Solution: @rom =xam"le '+ and =xam"le '1,


1( cof A = 11 1+ 2 1) ) ) - (

and
1( ad? A = 2 ) 11 1) 1+ ) (

=x"anding about the first column, we find that


A =2 ( 1 ( ) ++ + 1 ( 1 + ) = ) *

7ince

A +,

we ha2e

1*

1 ( 1 1 1 + 2& ' 1 1 A 1 = a d A? = 2 1 ) ) = 21 ' A )* ) - ( 22 '


In4erse of a " " Matrix
Aonsider the 2 2 matrix
a A = 11 a21 a12 a22

11 )* , 2' )*

2' 2 2' ) 2'

4t can be easily shown that


a cof A = 22 a12 a 21 a11

and thus
a ad? A = 22 a 21 a12 a11

4t is ;nown that
A = a11 a 22 a12 a 21

4f

A +,

then
A 1 = a 22 1 a11a 22 a12 a 21 a 21 a12 a11

4n other words, we can obtain the in2erse of a 2 2 matrix whose determinant is not <ero by (1) interchanging the elements on the main diagonal, (2) ta;ing the negati2e of the other two elements, and (') multi"lying the resulting matrix by the reci"rocal of the determinant of the original matrix. Example ((: 4f A = ) Solution: 5e first find
A = ' 2 ) = 2 ,

* 1 , find A . '

and

1,

' ad? A = )

* 1

Thus

1 ' 1 A = 2 , )

* 1& = ) 1 2 ,

2 & 1 2,

S%06TI%' %7 S8STEMS %7 0I'EAR E96ATI%'S


Definition "/: A s stem of n linear equations in n 2ariables is a system of the form
a11 x1 + a12 x2 + + a1n xn =b1 a21 x1 +a22 x2 + +a2 n xn =b2 an1 x1 +an 2 x2 + +ann xn =bn

where the aij ' s and bi ' s are constants. This system can be written in matrix notation as
a1 1 a 21 . an1 a1 2 a2 2 . an 2 . a1n a2 n . an n x1 x 2 xn b1 b = 2 bn

or

AX = B
where
a1 1 a A = 21 . an1 a1 2 a2 2 . an 2 . a1n a2 n , . an n x1 b1 x b 2 X = , and B = 2 xn bn

Thus, the matrix A is obtained from the coefficients of the 2ariables, the column matrix X is obtained from the 2ariables, and the column matrix B is obtained from the right side constants. The matrix A is called the !oeffi!ient matrix of the system. T1eorem *: 4f A is in2ertible, then the system AX = B has the solution

1(

X = A1B
&roof: 9remulti"ly both sides of AX = B by A1 to get
1 1 A (A X ) = A B 1 1 ( A A) X = A B

0 yth e

a s s o c ia ti2 1 * 1

e la w

I X =A

0 y B e f in itio n 0 y T h e o r e m

1 X = A B

This method of sol2ing a system of linear e/uations is 2alid only when the number of e/uations e/uals the number of 2ariables and when A is in2ertible. Example (): 7ol2e the system
x1 + 2 x2 = + ) x1 + & x2 = 1

Solution: The system can be written in matrix notation as


1 ) 2 & x1 + x = 1 2

or

AX = B
where
1 A= ) 2 , &

x + X = 1 , and B = 1 x2

5e find that
& A 1 = ) 2 1

Csing X = A1B, the solution is gi2en by


x1 & x = ) 2 2 1 + 2 1 = 1

Therefore, x1 = 2 and x2 = 1. Example (*: 7ol2e the system

1&
x1 2 x2 +2 x' = & 2 x1 + x2 x' = ' ' x1 2 x2 + x' = *

Solution: The system can be written in matrix notation as 1 2 ' or 2 1 2 2 1 1 x1 x = 2 x' & ' *

AX = B
where
1 A= 2 ' 2 1 2 2 1 , 1

x1 & X = x2 , and B = ' * x'

5e find that
1 1 A = ' ,
1

2 , (

+ ' '

Csing X = A1B, the solution is gi2en by x1 x = 1 2 ' x' 1 , 2 , ( + ' ' & ' = 1 ' * ' 1 )2 = 1) -, 1&

Thus, x1 = 1, x2 = 1) , and x' = 1& .

CRAMER:S R60E
Aonsider a system of n linear e/uations in n 2ariables as follows.
a11 x1 + a12 x2 + + a1n xn =b1 a21 x1 +a22 x2 + +a2 n xn =b2 an1 x1 +an 2 x2 + +ann xn =bn

or

2+

AX = B
where, as before,
a1 1 a A = 21 . an1 a1 2 a2 2 . an 2 . a1n a2 n , . an n x1 b1 x b 2 X = , and B = 2 xn bn

6et A j be the matrix obtained from A by re"lacing the jth column of A by the n 1 matrix B. T1eorem +: 4f
A +,

then the system AX = B has the solution gi2en by


x1 = A1 A , x2 = A2 A , . . . , xn =
An A

The result in Theorem * is ;nown as Cramer:s rule. Example (+: 7ol2e the following system using Aramer:s rule.
x1 + x2 = 1 2 2 x1 ' x2 = 1

Solution: The system can be written in matrix notation as


1 2 1 ' x1 x = 2 12 1

or

AX = B
Then
1 A= 2 1 , ' 12 A1 = 1 1 , '

and A2 = 2

12 1

5e find that
A = -,

A1 = ' -,

and

A2 = 2 -

Thus
x1 = A1 A = '=, -

and

21

x2 =

A2 A

2=-

Example (,: 7ol2e the following system using Aramer:s rule.


2 x1 + ' x2 x' = 1 ' x1 + - x2 + 2 x' = ( x1 2 x2 ' x' = 1

Solution: The system can be written in matrix notation as 2 ' 1 or ' 2 1 2 ' x1 1 x = ( 2 x' 1

AX = B
Then
2 A= ' 1 1 A1 = ( 1 2 A2 = ' 1 ' 2 ' 2 1 ( 1 1 2 ' 1 2 ' 1 2 '

and
2 A' = ' 1 ' 2 1 ( 1

5e find that
A =2 2,

A1 =* *,

A2 = 2 2,

and

A' = ))

Thus
x1 = A1 A = ** =' 22

22

x2 =

A2 A

22 = 1 22

and
x' = A' A = )) =2 22

You might also like