Matrices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Introduction to Linear Algebra , Matrices

MATRICES
Introduction

Linear algebra begins with sets of linear equations in several variables. The
number of variables may be large, or it may be unspecified. In either case we need an
alphabet larger than the ones used in ordinary language. Thus we invent synthetic ones. is
This unit provides an introduction to the basic concepts of matrices and system of linear
equations. You will develop operations on matrices and will work with matrices
according to the rules they obey; this will enable you to solve system of linear equations
and to do other computational problems in a fast and efficient manner.

The concept of matrices has a wide range of application in our life. One of the
main applications is to write systems of linear equation in a compact form, which enables
you to solve them very easily and efficiently.

Objectives
After successful completion of this unit, you will be able to:

 Define a matrix
 Apply operations on matrices
 Describe properties of matrices
 Reduce matrices into reduced row echelon form
 Find the inverse of a matrix by using elementary row
operations
 Solve system of linear equations by using Guassian
elimination
 Find the inverse of a matrix.

Addis Ababa University , CNCS 38


Introduction to Linear Algebra , Matrices

2.1. Definition of matrices.


Definition 2.1.1: An mxn (m by n) matrix A is a rectangular array of mn real (or
complex) numbers arranged in m horizontal rows and n vertical columns:

 a11 a12  a1n 


a a 22  a 2 n 
A= 
21

     
 
a m1 a m1  a mn 

Remark : A matrix is a rectangular array of numbers, or symbols , like the above.The


rows of a matrix are its horizontal lines: for example the second row of the matrix A has
entries a21 ,a22 , ….,a2n Note that the first subscript names the row from which the entry
is taken .The columns of the matrix are its vertical lines; the first column of A has entries
a11 ,a21 , ….,am1 .The second subscript names the column from which the entry comes.
Notation: When the entries of a matrix are named by means of subscripts, the matrix can
be abbreviated by telling the range of the subscripts.
The above matrix A will be written as A= [ aij ] mxn ( i =1,2,…,m ; j = 1,2,…,m).

Example2.1.1.
 2 0 3
A=   is a 2x3 matrix with a21 = -1 , a23 =4
 1 1 4
A = [1 0 -2 3] is a 1x4 matrix. with a13 = -2
A = [1] is a 1x1 matrix and a11 =1
 2  1
Activity 2.1.1: Let A =[ aij ] be a matrix   , and B =[ bij ] (i = 1,2 ;j = 1,2 ) with
0 3 
bij =aji . Write down B explicitely.

Definition 2.1.2 :Let A be an mxn matrix. If m = n, we say that A is a Square matrix of


order n.

2  1
Example 2.1.2 : A=   is a 2x2 or square matrix of order 2
4 7 
0 1 5
A= 2 1  1 is a 3x3 or square matrix of order 3.
1 0 13 

Definition 2.1.3 :The mxn zero matrix 0 mxn is the matrix with all entries equal to 0.

Addis Ababa University , CNCS 39


Introduction to Linear Algebra , Matrices

0 0  0
0 0  0
0 mxn = 
   
 
0 0  0

Definition 2.1.4:Two mxn matrices A= [ aij ] and B= [ bij ] are said to be equal if aij = bij
1  i  m, 1  j  n , that is, if they have the same size and the
corresponding components are equal.

0 1 5 
 2 0 3 2 1  1 are not equal since they do not
Example 2.1.3: The matrices   and  
 1 1 4 1 0 13 
have the same size.
There are three binary matrix operations These are matrix addition , multiplication of a
matrix by a scalar and multiplication of two matrices.

2.2. Operations on matrices.


Matrix Addition
Definition 2.2.1: If A=[ aij ]and B=[ bij ] are mxn matrices that is A and B two matrices of
the same size, then their sum written A + B , is the matrix obtained by adding
corresponding entries of A and B.

That is : If A + B = C, then C is the mxn matrix where C= [ cij ], such that cij = aij + bij
(1  i  m , 1  j  n )

Remark : If A and B do not have the same number of rows and columns , their sum is
not defined.

Example2.2.1 : Let

 0  1 4 6 4  1 
A=   and B=  
 3 2 5  7 0  2 
Then

 0  6  1  4 4  1 6 3 3
A+B =   =  
 3  7 2  0 5  2 4 2 3

The Second operation is multiplication of a matrix by a scalar(That is a number)

Addis Ababa University , CNCS 40


Introduction to Linear Algebra , Matrices

Scalar Multiplication:

Definition 2.2.2: If A= [ aij ] is an mxn matrix and  is a scalar, then the scalar multiple
of A by , A is the mxn matrix B= [ bij ], where bij =  aij (1  i  m , 1  j  n ).
Remark : B is obtained from A by multiplying each element of A by .

 0  1 4
Example 2.2.2: Let A=   and
 3 2 5
 0  1 4  0  3 12
(a) If = 3 , then A= 3A= 3   = .
 3 2 5  9 6 15
 0  1 4  0 1  4 
(b) If  = -1, then A = -1A = (-1)   = .
 3 2 5 3  2  5 
Definition 2.2.3:
If A and B are mxn matrices, then we define
A - B = A + (-1)B and we call this the difference of A and B.

 0  1 4 6 4  1 
Example 2.2.3 : Let A=   and B = 7 0  2 
 3 2 5  
Then find A - B

Solution

A - B = A+ (-1)B
6 4  1    6  4 1 
(-1)B=   =  
7 0  2    7 0 2 
 0  1 4   6  4 1    6  5 5
A- B = A+ (-1)B =   +   = 
 3 2 5  7 0 2  10 2 7
Activity 2.2.1
0 1 3 
 2  1  8 1 0  3
LetA=   ,B=   and C =  1 3  2 B. Then Find
 3 12 3  5  1  2  0 1 6 
a) A+B
b) A - B
c) A + C
d) A-2B

Next we state several elementary properties of matrix addition and scalar


multiplication

Addis Ababa University , CNCS 41


Introduction to Linear Algebra , Matrices

Theorem 2.2.1: Properties of Matrix Addition and scalar Multiplication

Let A, B, C can be an mxn matrices and  ,    . Then


M1 . A+B = B+A ( Commutativity of Addition)
M2. A+(B+C) = (A+B)+C( Associativity of Addition)
M3. A+0 =0 +A = A
M4. A + (-A) = (-A)+A = 0
M5.  (A+B) =  A+  B
M6. (  +  )A =  A+  A
M7.  (  A) = (   )A
M8. 1A= A
M9. 0A = 0
Proof:

Let A=[ aij ] ,B=[ bij ] and C = [ cij ] where 1  i  m , 1  j  n

M1.A + B = [ aij + bij ] = [ bij + aij ] = B + A


M2. A+(B+C) =[ aij ] + [ bij + cij ]
=[ aij +( bij + cij )]
=[( aij + bij )+ cij ]= [ aij + bij ]+[ cij ] = (A + B ) + C
M3. A + 0 = [ aij + 0] = [ aij ] = A
M4. A + (-A) = [ aij +(- aij )] = [0] = 0
M5.(A+B)= [ aij + bij ] = [ aij + bij ] =[ aij ] + [ bij ] = A + B
M6. (  +  )A = (  +  ) [ aij ]
= [(  +  ) aij ]
=[  aij +  aij ]
=[  aij ] + [  aij ]
=  [ aij ] +  [ aij ]
=  A+  A
M7, M8 and M9 are left as an exercise.

Matrix Multiplication

Definition 2.2.4 : Let A = [ aij ] is an mxn matrix and B= [ b jk ] is an nxp matrix, then the
product of A and B, AB, is the mx p matrix C= [ cik ], defined by
n
cik = ai1b1k+ai2b2k+…..+ ainbnk = a b
j 1
ij jk (1  i  m , 1  k  p ).

Note that the product of A and B is defined only when the number of columns of A is
equal to the number of rows of B .

Addis Ababa University , CNCS 42


Introduction to Linear Algebra , Matrices

 2  1   1
Example 2.2.4 Let A =   and B =   . Find A.B
4 7  1
Solution
A is a 2x2 matrix and B is a 2x1 matrix hence multiplication of matrices is defined .

AB is a 2x1 matrix .Let C = ( cik ) where (1  i  2 , 1  k 1 ) be AB.

C=( cik ) (1  i  2 ,1  k 1 )
i =1, k = 1 c11 = a11 .b11  a12 .b21 = 2.(-1) + (-1)1 = -3

i =2, k = 1 c 21 = a21 .b11  a22 .b21 = 4.(-1) +7.1 = 3


  3
Therefore AB=  
 3 
0  2  1  1 0 3

Example 2.2.5 Let A = 1 0 4  and B =  2 1 2

5 1 1   2 1 4
Find a. AB
b. BA
Solution

A is a 3x3 matrix and B is a 3x3 matrix hence multiplication of matrices is defined . AB

is a 3x3 matrix .Let C = ( cik ) where (1  i  3 , 1  k  3 ) be AB.

C=( cik ) (1  i  3 ,1  k  3 )
cik = ai1.b1k  ai 2 .b2 k  ai 3b3k
i =1, k = 1 , c11 = a11 .b11  a12 .b21  a13b31 = 0.1 +(-2)(-2) +(-1)2 =2

i =1 ,k = 2 , c12 = a11 .b12  a12 .b22  a13b32 = 0.0 +(-2)1 +(-1)1 =-3

i =1,,k = 3 , c13 = a11 .b13  a12 .b23  a13b33 = 0.3 +(-2)2 +(-1)4 =-8

i =2,,k = 1 , c 21 = a21 .b11  a22 .b21  a23b31 = 1.1 +0(-2) +4.2 =9

i =2,,k = 2 , c 22 = a21.b12  a22 .b22  a23b32 = 1.0 +0.1 + 4.1 = 4

i =2,,k = 3 , c 23 = a21 .b13  a22 .b23  a23b33 = 1.3 +0.2 +4.4 = 19

Addis Ababa University , CNCS 43


Introduction to Linear Algebra , Matrices

i =3,,k = 1 , c31 = a31.b11  a32 .b21  a33b31 = 5.1 +1(-2) +1.2 =5


i =3,,k = 2 , c32 = a31 .b12  a32 .b22  a33b32 = 5.0 +1.1 + 1.1 = 2

i =3,,k = 3 , c
33 = a31 .b13  a32 .b23  a33b33 = 5.3 +1.2 +1.4 = 21
Hence
0  2  1  1 0 3  c11 c12 c13  2  3  8
A B = 1 0 4   2 1 2 = c 21 c 22 c 23  = 9 4 19 
5 1 1   2 1 4 c31 c32 c33  5 2 21 
Similarly
 1 0 3 0  2  1 15 1 2
BA =  2 1 2 1 0 4  = 11 6 8
 2 1 4 5 1 1  21 0 6
From the above example we can conclude that AB BA.
Remark : Matrix multiplication is not commutative.

Activity2.2.2
 0 1  2
 0  1 4
Let A =   and B = 1 0 5 
 3 2 5 2  1 1 
Compute AB

Theorem 2.2.2: Properties of Matrix multiplication

If A, B, and C are compatible matrices under multiplication and addition, then

1. A(BC) = (AB)C
2. A(B+C) = AB + AC
3. (A+B)C = AC + BC

Example 2.2.6
 3  1 1  1 5   4 3  2
Let A =   , B =   and C = 0  3 11 
4 5  3 1  3  
Compute
a. B + C
b. A(B + C)
c. AB
d. AC

Addis Ababa University , CNCS 44


Introduction to Linear Algebra , Matrices

Solution

1  1 5  4 3  2 1  4  1  3 5  2  5 2 7
a. B+C=   +  =  =  
3 1  3 0  3 11  3  0 1  3  3  11 3  2 8

 3  1 5 2 7 3.5  (1)3 3.2  (1)(2) 3.7  (1)8


b. A(B + C) =     =
 4 5  3  2 8  4.5  5.3 4.2  5.(2) 4.7  5.8 
12 8 13 
=  
35  2 68
 3  1 1  1 5  3.1  (1)3 3(1)  (1)1 3.5  (1)(3)
c. AB =     =
 4 5  3 1  3  4.1  5.3 4.(1)  5.1 4.5  5.(3) 
 0  4 18
=
19 1 5 

 3  1 4 3  2 12 12  17
e. AC =    =  
 4 5  0  3 11  16  3 47 
From the above AB + AC = A(B + C )

Activity 2.2.3
 0  1
 1 9  2  2  1 0  
Let A =   , B =  and C =  2 3 
 1 0 1    1  2 3 5 1 
 
Compute
a. A + B
b. (A + B)C
c. AC
d. BC

Activity 2.2.4
Suppose A , B and C be matrices such that
 6  1 0 5 1 2 
AC =   and BC =   . Find (A+B)C
  4 0 2 3 2  3

Definition 2.2.5: Suppose that A is a square matrix and let n be a positive integer, then
we
define An = AAn-1
That is A2 = AA , A3 = AA2 , A4 = AA3 and so on An = AAn-1

Remark : A0 = I

Addis Ababa University , CNCS 45


Introduction to Linear Algebra , Matrices

2.3. Types of matrices


The Transpose of a Matrix

There is another operation on matrices , this one is a unary operation.

Definition 2.3.1 :If A= [ aij ] is an mxn matrix, then the nxm matrix
A t  [ bij ],where bij = a ji (1  i  m , 1  j  n )is called the transpose of A.
Remark : If A is an m x n matrix , then A t is an n x m matrix.

1 4
Example2.3.1: Let A=  3  1 . Find A t

 2 2 
Solution
Since A is an 3 x 2 matrix , A t is a 2 x 3 matrix.
A t  [ bij ] where bij = a ji (1  i  3 , 1  j  2 )
b11 = a11 = 1 , b12 = a 21 = 3 , b13 = a31 = -2 ,
b21 = a12 = 4 , b22 = a 22 =-1 , b23 = a32 = 2
Therefore
b b12 b13   1 3  2 
A t = [ bij ] =  11  =  
 b21 b22 b23   4  1 2 
Remark : The transpose of A is obtained by interchanging the rows by the columns of A
Activity 2.3.1:
2 1 0 6 
Let A=   . Find A t
 4 3 5  2

Theorem 2.3.1 Properties of Transpose

If  is a scalar and A and B are matrices, then


T1. (At)t = A
T2. (A+B)t = At+ Bt
T3. (AB)t = BtAt
T4. (A)t= At

Remark : By using property T3 , one can show that (ABC)t = Ct BtAt and in general
(A1A2…An)T=Ant…A2tA1t

Addis Ababa University , CNCS 46


Introduction to Linear Algebra , Matrices

Example2.3.2: Let
 3  1 1  1 5 
Let A =   and B =  
4 5  3 1  3
Compute

1. At
2. Bt
3. Bt At
4.(AB) t
Solution

 3 4
a. At =  
1 5
1 3
b.B =  1 1 
t 
 5  3
1 3  0 19
 3 4
c. B A =  1 1 
t t 
  =  4 1 
 
 5  3  1 5  18 5 

 3  1 1  1 5   0  4 18
d. AB =    =
 4 5  3 1  3 19 1 5 

 0 19
(AB) t=
B A =  4 1 
t t

 18 5 

Definition 2.3.2: A square matrix A =( aij ) is called an identity matrix if aij =1


whenever
i = j and aij = 0 whenever i  j .It is then denoted by In or I when the
order is clear from the context.
1 0 0
 0 0
I2 =   and I3 = 0 1 0
 
 0 0 0 0 1

Addis Ababa University , CNCS 47


Introduction to Linear Algebra , Matrices

Definition 2.3.3 :A square matrix in which all the diagonal elements are 0 is called a
diagonal matrix..That is A =( aij ) is a diagonal matrix iff aij = 0
whenever i  j .
  2 0 0
Example 2.3.3: A =  0 3 0 is a diagonal matrix
 0 0 3

 0 0
A =   is a diagonal matrix
 0 0
Definition 2.3.4 :A diagonal matrix in which all diagonal elements are equal is called a
scalar matrix.
3 0 0 
Example 2.3.4: A = 0 3 0 is a scalar matrix
0 0 3

 0 0
A =   is a scalar matrix
 0 0
Remark : Scalar matrices can be written as I for some scalar  and behaves like a
scalar. That is I + I =( + )I and
I.A = A

Definition 2.3.5: A square matrix A =( aij ) is called an upper triangular matrix if all
the elements below diagonal are 0 , that is aij = 0 whenever i > j
Definition 2.3.6: A square matrix A =( aij ) is called a lower triangular matrix if all the
elements above diagonal are 0 , that is aij = 0 whenever i < j
Definition 2.3.7: A square matrix A =( aij ) is called triangular matrix if it is either
upper triangular or lower triangular .

Example 2.3.5 : In the following two matrices


 2  1 4 3 0 0
A= 0 3 7 and B =  2 5
  0
0 0 8  2 9 4
A is an upper triangular matrix while B is a lower triangular matrix

Definition 2.3.8:A matrix A= [ aij ] is called symmetric if At = A .


That is, A is symmetric if it is a square matrix for which a ij = a ji for all i,j.

Addis Ababa University , CNCS 48


Introduction to Linear Algebra , Matrices

 2  1 4
Example :  1 3 7 is a symmetric matrix.
 4 7 8

Note Symmetry of a matrix refers to symmetry about the principal diagonal

Example 2.3.6:If A and B are symmetric matrices of the same order and
 is a scalar then A and A + B are symmetric matrices.
Solution:
a. (A) t= A t = A . Hence A is a symmetric matrix.
b. (A + B) t =At + Bt =A + B.Hence A + B is a symmetric matrix.
Remark : AB may not be symmetric.For example
2 1  3 4 10 9 
Consider A =   and B =   which are symmetric matrices.But AB =  
 1 4 4 1 19 8 
is not symmetric.

Definition 2.3.9:A matrix A= [ aij ] is called skew symmetric if At = -A.


That is, A is skew symmetric if it is a square matrix for which a ij =- a ji forall i, j.
 0  3 4
Example2.3.7 :A=  3 0 5 is a skew symmetric matrix since At = -A.
 4  5 0

Note: The main diagonal elements of a skew symmetric matrix must all be zero.

Example2.3.8: Let A be any square matrix. Then


a. A + At is symmetric
b. A- At is skew symmetric
c.A can be written as a sum of a symmetric and skew
symmetric matrices.
Solution
a) (A + At)t = At + (At)t = At + A
b) (A- At )t = At - (At)t = At - (At)t = At - A = - (A- At ).
Hence A- At is a skew symmetric matrix.
1 1
c) Let B= (A + At), C = (A- At). Then A = B+C .Moreover since B is
2 2
symmetric and C is skew symmetric, Any matrix can be written as a sum of
symmetric and skew symmetric.
Activity 2.3.2
Give an example of a matrix which is
a) An upper triangular matrix
b) Whose transpose is an upper triangular matrix
c) A lower triangular matrix
d) Whose transpose is a lower triangular matrix

Addis Ababa University , CNCS 49


Introduction to Linear Algebra , Matrices

e) Symmetric
f) Skew symmetric

2.4 Elementary Row Operations and Inverse of a matrix.


In this section We shall study some operations called elementary operations which can be
used to reduce any given matrix to one with a simple form thereby facilitating the
solution of some problems to be solved for the original matrix.

Row echelon form

Definition2.4.1:An mxn matrix is said to be in row echelon form when it satisfies the
following properties:
R1) All rows consisting entirely of zeros, if any, are at the bottom of the
matrix.
R2) The leading non zero number in a row is 1.
R3) If two successive rows that do not consist entirely of zeros, then the
leading entry of the lower row is farthest to the right than the leading
entry of the upper row.
Example 2.4.1: The matrices

1 2 0 0 1 3 5 1 4 0 0 0 0 
A= 0 0 1 0 , B = 0 0 1 0 1 , and C=
 0 0 0 0 
 
0 0 0 0 0 0 0 1 3 0 0 0 0
are in row echelon form.

Example 2.4.2 The matrices


1 0 3 4 1 0 5 4
1 1 1 1 0
  1 2 5 0 1 2 7
A= 0 0 0 0 , B=  and C=  are not in row
0 0 2 2 0 1 3 6
0 0 1 4    
0 0 0 0 0 0 0 0

echelon form. Because in case of Matrix A Condition R1 failed , Matrix B Condition R2


failed and Matrix C Condition R2 failed

Activity 2.4.1
Give different examples of matrices which are in row echelon form.

Definition 2.4.2 An mxn matrix is said to be in reduced row echelon if its in the row
echelon form and the elements above the first non zero entry any row
are 0(the elements below are already 0).

Addis Ababa University , CNCS 50


Introduction to Linear Algebra , Matrices

Example 2.4.3 : Consider

1 2 0 0 1 3 5 1 4
A= 0 0 1 0 , B = 0 0 1 0 1 ,
 
0 0 0 0 0 0 0 1 3
A is in reduced row echelon form while B is not in reduced row echelon form.

Elementary operation

Definition2.4.3:An elementary row operation on a matrix is any one of the following


operations:
a) Interchange two rows .
b) Multiply a row by a non zero constant
c) Replacing a row by the sum of that row and a scalar multiple of
another row.
Notation :

Ai,j Interchanging the i th with j th row of A.


Ai,  Ai, Multiply the i th row of A by .
Ai,  Ai + Aj Add  times the j th row of A to the i th row of A.

Remark: An elementary column operation on a matrix is defined similarly.By an


elementary operation we mean an elementary row operation or an elementary column
operation.

Definition 2.4.4:An elementary column operation on a matrix is any one of the


following operations:
a) Interchange two columns .
b) Multiply a column by a non zero constant
c) Replacing a column by the sum of that column and a scalar multiple
of another column.
Definition 2.4.5: We say two matrices are equivalent if one is obtained from the other
by a finite sequence of elementary operations.

Notation : If A and B are equivalent then we write A  B

Example 2.4.4: Let


1 3 5 1 4  1 4 0 5 7   1 4 0 5 7 
A =  1 4 0 5 7 A1, 2
 1
 3 5 1 4 A2, 3  3  2 5 6 3
 
 3  2 5 6 3  3  2 5 6 3  1 3 5 1 4

Addis Ababa University , CNCS 51


Introduction to Linear Algebra , Matrices

1 3 5 1 4   1 4 0 5 7

Hence ,  1 4 0 5 7   3  2 5 6 3 Similarly
 3  2 5 6 3  1 3 5 1 4
1 3 5 1 4 1 3 5 1 4

A =  1 4 0 5 7 A2  2A2  2
 8 0 10 14 A3 A3 + -1A1
 3  2 5 6 3  3  2 5 6 3 

1 3 5 1 4 1 3 5 1 4
 2 8 0 10 14  A  2  5 0 5  1
  2, 3  
 2  5 0 5  1  2 8 0 10 14 
Hence ,

1 3 5 1 4  1 3 5 1 4
 1 4 0 5 7   2  5 0 5  1
   
 3  2 5 6 3  2 8 0 10 14 

Note: A is column equivalent to B if and only if At is row equivalent to Bt.


Next we state a theorem without proof

Theorem 2.4.1: Any matrix can be reduced to a matrix in reduced echelon form by
elementary operations.
 3 5
Example2.4.5: Reduce A =  
  1 2
a. In to row echelon form.
b. In to reduced row echelon form.

Solution
 3 5   1 2 1  2
a. A =   A 2, 1  3 5 A1 (-1)A 1 3 5 
  1 2    
1  2  1  2 
A2A2+(-3)A1   A2 ( 1 )A2  
0 11  11 0 1 
1  2
Hence   is the row echelon form of A.
0 1 
 3 5 1  2 1 0
b. A =  
   A1 A 1 +(2)A2 0 1 
  1 2  0 1   
1 0 
Hence   is the reduced row echelon form of A.
0 1 

Addis Ababa University , CNCS 52


Introduction to Linear Algebra , Matrices

 1 1 2 
Example 2.4.6: Reduce A =  2 1  1
 0 1 2 
a. In to row echelon form.
b. In to reduced row echelon form.

Solution
 1 1 2  1  1 2 1  1 2 
A =  2 1  1 A2A2+(2)A1 0  1 3
  A2 (-1)A2 0 1  3
 0 1 2  0 1 2 0 1 2 
1  1 2  1 1 2 
A3A3+(-1)A2 0 1  3 A3 ( )A3 0
  1 1  3
5
0 0 5  0 0 1 
1  1 2 
Hence 0 1  3 is the row echelon form of A.
0 0 1 
b.
 1  1 2  1  1 2  1 0  1
A =  2 1  1  0 1  3 A1A1+(1)A2 0 1  3
   
 0 1 2  0 0 1  0 0 1 
1 0  1 1 0 0
A2A2+(3)A3 0 1 0  A1A2+(1)A3 0 1 0
 
0 0 1  0 0 1
Activity 2.4.1

1  1 2 
Find the reduced row echelon form of A = 0 1  3
3 3  1
The Inverse of a Matrix

Definition 2.4.6:An nxn matrix A is called nonsingular (or invertible) if there exists an
nxn matrix B such that
AB=BA=In.

The matrix B is called an inverse of A denoted by A-1. If there exists no


such matrix B, then A is called singular (or noninvertible).

Addis Ababa University , CNCS 53


Introduction to Linear Algebra , Matrices

Example 2.4.7: Let


1 2  3  2
A=   and B=  1 1  .
1 3  
Since AB = BA = I2 ,we conclude that B is the inverse of A and hence
that A is invertible..

Theorem 2.4.2 :If a matrix is invertible , then its inverse is unique.

Proof:Let B and C be inverses of A. Then


CA = A B= In.
Therefore,
C= CIn = C(AB) = (CA)B = InB = B
Remark : Since the inverse of amatrix if it exists is unique,We write the inverse of A by
A-1. Therefore, A-1 = A-1A = In .
1 2 a b 
Example 2.4.8: Let A =   .To find A-1, let A-1 =   .
1 3 c d 
Then we must have
1 2 a b  1 0
A A-1 =    =  
1 3  c d  0 1
so that
a  2c b  2d  1 0
 a  3c b  3d  = 0 1
   
For the above two matrices to be equal the corresponding components should be
equal. Hence
a+ 2c = 1 a + 3c = 0
b + 2d =0 b + 3d = 1
Collecting terms
a+ 2c = 1 b + 2d = 0
a + 3c = 0 b + 3d = 1
Solving simultaneously
a = 3, c = -1 , b = -2 , d= 1
Therefore
 a b   3  2
A-1=  =  
 c d   1 1 
Activity 2.4.2 :
 3  2 1 2
By matrix multiplication show that   is the inverse of  .
 1 1  1 3
Theorem 2.4.3
1. If A is an invertible (nonsingular)matrix, then A-1 is invertible (nonsingular) and
(A-1)-1 = A.
2. If A is an invertible (nonsingular)matrix, then (At)-1 = (A-1)t.
3. If A and B are invertible (nonsingular) matrices, then AB
invertible (nonsingular) and (AB)-1 = B-1 A-1.

Addis Ababa University , CNCS 54


Introduction to Linear Algebra , Matrices

Proof

1. Let A be an invertible matrix . there exists a matrix B such that AB=BA=In. B-1 =A
.Since B = A-1 , B-1 = A implies that (A-1)-1 = A
2. (At)(A-1)t = (A-1A)t = I t = I and (A-1)t(At) =(AA-1)t = I t = I
Therefore , (At)-1 = (A-1)t
3. AB(B-1 A-1 )= A(BB-1 )A-1= AI A-1=A A-1= I .Similarly
(B-1 A-1 ) AB =B-1 (A-1 A)B = B-1 I B = B-1B = I
Therefore , (AB)-1 = B-1 A-1

Remark: By repeated application the preceding theorem ,It can be shown that if
A1 , …An are invertible matrices of the same order then
(A1A1 …An)-1 = An-1 An-1-1 …….A2-1 A1-1

Procedure for finding the inverse of a matrix.

The procedure for computing the inverse of matrix A is as follows.

Step1. Form the augmented matrix B = [ A  I n ] obtained by adjoining the identity


matrix In to the given matrix A.
Step2. By using elementary row operations on B ,Transform the matrix A in to reduced
row echelon form.
Step3.
a.If the reduced row echelon form. of A is the identity matrix , A is invertible and its
inverse is the matrix to the right of the vertical bar..
b.If the reduced row echelon form. of A is not the identity matrix , A is not invertible.
1 2
Example 2.4.9 : Find the inverse of the matrix  
1 3
Solution :
1 2
Let A=  
1 3

1 2 : 1 0 
Step 1. B =  
1 3 : 0 1 

1 2 : 1 0  1 2 : 1 0
Step 2: B =   B2B2+(-1)B1  
1 3 : 0 1  0 1 : 1 1

1 0 : 3  2
B1B1+(-2)B2  
0 1 :  1 1 
1 0 : 3  2
Therefore   is the reduced row echelon form of B.
0 1 : 1 1 

Addis Ababa University , CNCS 55


Introduction to Linear Algebra , Matrices

Step 3 : Since the reduced row echelon form. of A is the identity matrix , A is invertible
 3  2
and its inverse is  
 1 1 
1  1 2 
Example 2.4.10 : Find the inverse of the matrix 0 1  3
3 3  1
Solution :
1  1 2 
Let A= 0 1  3
3 3  1

 1  1 2 : 1 0 0
 
Step 1. B =  0 1  3 : 0 1 0 
 3 3 1 : 0 0 1
 
 1  1 2 : 1 0 0
 
Step2:B =  0 1  3 : 0 1 0  B3B3+(-3)B1
 3 3 1 : 0 0 1
 
1 1 2 : 1 0 0 1 1 2 : 1 0 0
   
 0 1  3 : 0 1 0  B3B3+(-6)B2  0 1  3 : 0 1 0
0 6  7 :  3 0 1  0 0 11 :  3  6 1 
   
1 1 2 : 1 0 0 

B3 1 B3  0 1  3 : 0 1 0 
11 
0 0 1 : 3 6 1 
 11 11 11

1 1 2 : 1 0 0 

B2B2+(3)B3  0 1 0 :  9 7 3 
 11 11 11
0 0 1 :  3   6 1 
 11 11 11

 1  1 0 : 17 12 2 
 11 11 11

B1B1+(-2)B3 0 1 0 :  9  7 3 
 11 11 11 
0 0 1 :  3 6 1 
 11 11 11 

Addis Ababa University , CNCS 56


Introduction to Linear Algebra , Matrices

1 0 0 : 8 5 1 
 11 11 11
B1B1+(1)B2  0 1 0 :  9  7 3 
 11 11 11
0 0 1 : 3 6 1 
 11 11 11
Step 3 Since the reduced row echelon form. of A is the identity matrix , A is invertible
 8 5 1 
 11 11 11
and its inverse is  9 7 3 
  311 11
1
11
 11  6 11 11
 8 5 1 
 8  5 1
 11 11 11
Hence A-1 =  9 7 3  = 1  9  7 3
 3 11 11 11 11  
 6 1   3  6 1
 11 11 11
Activity 2.4.3
Find the inverse of
1 2
1. A =  
0 3 
1 2 0 4
 
0 3 1 0
2. A = 
0 1 0 4
 
1 1 1 4
 

2.5 Rank of a matrix

Definition 2.5.1 :The rank of a matrix is the number of non zero rows the row echelon
form
of the matrix.
1 1
Example 2.5.1: Let A= 0 1 . Find the rank of A.
0 0
Solution:
A is in row echelon form. A has two non zero rows. Hence the rank of A is 2.
Activity 2.5.1:
1 3 1
Let A= 0 1 2 . Find the rank of A
0 0 1

Addis Ababa University , CNCS 57


Introduction to Linear Algebra , Matrices

Activity 2.5.2:
2 3 1 
Let A= 0 1 2 . Find the rank of A
0 1 2

Remark : If A is an mxn matrix , the the rank of A is less than or equal to the min(m,n)

2.6 System of Linear Equations and methods of solving.


System of linear equations

Consider the following m system of linear equations in n unknowns:


a11 x1  a12 x 2    a1n x n  b1
a 21 x1  a 22 x 2    a 2 n x n  b2
(*)

a m1 x1  a m 2 x 2    a mn x n  bm
Now define the following matrices:
 a11 a12  a1n   x1   b1 
a a 22  a 2 n  x  b 
A=  , x=  , b=  .
21 2 2

      
     
a m1 a m 2  a mn   xn  bn 

Hence linear system (*) above can be written in matrix form as

Ax = b.
Note : If b is the zero matrix then the system is said to be homogeneous otherwise non
homogeneous.

The matrix A is called the coefficient matrix of the equations in (*), and the matrix
 a11 a12  a1n  b1 
a a 22  a 2 n  b2 
B= 
21

     
 
a m1 a m 2  a mn  bm 
Obtained by adjoining b to A, is called the augmented matrix of (*). Like inveses of a matrix
, the augmented matrix of (*) will be written as [ A  b ].

Addis Ababa University , CNCS 58


Introduction to Linear Algebra , Matrices

Example 2.6.1 :Consider the following system of three linear equations in two unknowns.
x - 2y +z =12
-2x + + z = 5
a. Write in the form of AX = b
b.Write the augmented matrix B
Solution
a.The system can be written as.
x - 2y + z =12
-2x +0y + z = 5.
 x
 1  2 1   12 
A =   X =  y  b=  
  2 0 1 z 5
 
 1  2 1 : 12 
b. B =  
 2 0 1 : 5 

Activity 2.6.1:Consider the following system of three linear equations in two unkowns.
3x1 + 2x2 +7x3 +4x4 =0
x1 - 3 x2 - 6x3 + x4 = 3
8x1 + x3 - 3x4 =2
a) Write in the form of AX = b
b)Write the augmented matrix B

Solving Systems of linear equations

Consider the following m system of linear equations in n unknowns:


a11 x1  a12 x 2    a1n x n  b1
a 21 x1  a 22 x 2    a 2 n x n  b2
(*)

a m1 x1  a m 2 x 2    a mn x n  bm
Our aim is now to solve the above system of linear equations

If b1 = b2 = …..= bn = 0 , the system is called homogeneous otherwise it is non


homogenous system.

A solution of the above equation (*) is an n – tuple that satisfies the system. The solution set S
is the family of all such n-tuples .Solving the system means describing the set S in some way
that enables us to tell easily whether a given n – tuple belongs to S or not.
Remark : A homogenous system always has a solution where x1 = x2 = …..= xn = 0 , which is
called a trivial solution.

Guassian elimination, named for the great Mathematician C.F.Guass , is the process of
reducing a matrix to row echelon form.

Addis Ababa University , CNCS 59


Introduction to Linear Algebra , Matrices

Operations that leads to equivalent systems of equations

Each of the following operations performed on a system of linear equations produces an


equivalent system .
i) Interchange two equations
ii) Multiply an equation by a non zero constant
iii) Add a multiple any equation to any other equation.

Given a system of m linear equations in n unknowns.Three questions arise

(i) Does the system have any solution


(ii) If so, how many?
(iii) What are the solutions?

The solution Set S of (*) is not changed to the standard form by these three operations
a. Two equations are interchanged
b. One equation is multiplied by anumber that is not 0.
c. One equation is changed by adding another one to it

The operations (a,b,c) have counterparts for matrices. Interchnging two linear equations is
equivalent to interchnging two rows of the matrix of the system. Multiplying an equation by a
number corresponds to multiplying the associated row of the matrix by the same number.
Finally adding one equation to another is equivalent to adding one row to another row.

Guassian – Jordan method for solving Systems of linear equations

Consider the following m system of linear equations in n unknowns:


a11 x1  a12 x 2    a1n x n  b1
a 21 x1  a 22 x 2    a 2 n x n  b2

a m1 x1  a m 2 x 2    a mn x n  bm
To solve the System

Step 1. Write in the form of Ax = b.


Step2. Form the augmented matrix B = [ A  b ].
Step3. Transform the augmented matrix to reduced row echelon form by using elementary row
operations.
Step4. Compare the rank of A and the rank of B
a. If rank of A < rank of B , the system has no solution
b. If rank of A = rank of B , the system has a solution
(i) rank of A = rank of B = n , the system has exactly one solution.
(ii) rank of A = rank of B < n , the system has infinitely
many solutions.
Step 5. Use back substitution
The above method is called Guass-Jordan elimination.

Addis Ababa University , CNCS 60


Introduction to Linear Algebra , Matrices

Example 2.6.2: Solve


x - 2y +z = 0
-2x + + z = -1
2x – y + z = 2

Solution
 1  2 1  x 0
     
Step 1: A =   2 0 1 X =  y  b =   1
 2  1 1 z 2
     
 1 2 1 : 0 
 
Step2 : B=   2 0 1 :  1
 2 1 1 : 2 
 
 1 2 1 : 0  1  2 1 : 0 
   
Step 3: B=   2 0 1 :  1 B2B2+2B1  0  4 3 :  1
 2 1 1 : 2  2 1 1 : 2 
   

1  2 1 : 0  1  2 1 : 0 
   
B3B3+(-2)B1  0  4 3 :  1 B2  1 B2  0 1  3 : 1 
4 4 4
0 3 1 : 2  0 3  1 : 2 
   

1  2 1 : 0  1  2 1 : 0 
  

B3B3+(-3)B2 0 1  3 : 1  4
B3 B3  0 1  3 : 1 
 4 4 5 4 4
5 0 0 : 1 
0 0 : 5   1
 4 4

Now B is changed in to row echelon form.


Step 4. The rank of A = 3 (The left hand of the vertical bar) and the rank of B = 3 , the
system has a solution. Since
rank of A = rank of B = 3 = n , the system has exactly one solution.
Step 5. By Using back substitution
1  2 1 : 0 
 
0 1  3 : 1 
4 4
0 0 1 : 1 

z = 1 , y + 3 z = 1  y = 1
4 4
z = 1 , y = 1 , x + -2y + z = 0  x = 1
Hence x = 1, y = 1, z = 1

Remark:The linear systems with at least one solution are called consistent, otherwise the
system is said to be inconsistent.A consistent system has either one solution or infinitely many
solutions.

Addis Ababa University , CNCS 61


Introduction to Linear Algebra , Matrices

Theorem 2.6.1 : A system of linear equations with fewer equations than variables must
have either an infinite number of solutions or no solution.( Such a system cannot have a
unique solution)

Proof : m < n . Rank A = r  min(m,n) = m < n


 rank A < n
 It has no unique solution
Note: In a consistent system rank A = r < n , n – r of the unknowns are assigned any
values whatever, the other r unknowns are uniquely determined.

Example 2.6.3 : Solve


2x +y +2z =3
3x – y +4 z = 7
x +3y = -1

Solution
 2 1 2  x 3
     
Step 1: A =  3  1 4  X =  y  b =  7 
1 3 0 z  1
     
2 1 2 : 3 
 
Step2 : B=  3  1 4 : 7 
 1 3 0 :  1
 
2 1 2 : 3   1 3 0 :  1
   
Step 3: B=  3  1 4 : 7  B1,3  3  1 4 : 7 
 1 3 0 :  1 2 1 2 : 3 
   

 1 3 0 :  1 1 3 0 :  1
   
B3B3+(-2)B1  3  1 4 : 7  B2 B2+(-3)B1  0  10 4 : 10 
0  5 2 : 5  0  5 2 : 5 
   

 1 3 0 :  1  1 3 0 :  1
   
B2B2+(-2)B3  0 0 0 : 0  B3,2  0  5 2 : 5 
0  5 2 : 5  0 0 0 : 0 
   

1 3 0 : 1
 
B2  1 B2  0 1  2 :  2
5 5
0 0 0 : 0 

Now B is changed in to row echelon form.
Step 4. The rank of A = 2 (The left hand of the vertical bar) and the rank of B = 2 , the
system has a solution. Since

Addis Ababa University , CNCS 62


Introduction to Linear Algebra , Matrices

rank of A = rank of B < 3 = n , the system has infinitely many solutions.


Step 5. By Using back substitution
r =rank of A = 2 , n = 3
n - r = 3 – 2 = 1 unknown will be assigned any value let us say t.
Let z = t
y +  2 z = -2  y +  2 t = -2  y = -2 + 2 t
5 5 5
x + 3y = -1  x = -1 + -3y x = -1 +-3(-2 + 2 t)  x = -7 +  6 t
5 5
Hence the solution is x = -7 +  6 t , y = -2 + 2 t , z = t where t
5 5

Example 2.6.4 : Solve


x - y +z = 2
2x + y + z = 1
3x + 2z = 5

Solution
1 1 1  x  2
     
Step 1: A =  2 1 1  X =  y  b =  1 
 3 0 2 z 5
     
 1  1 1 : 2
 
Step2 : B=  2 1 1 : 1 
 3 0 2 : 5
 
 1  1 1 : 2 1 1 1 : 2 
   
Step 3: B=  2 1 1 : 1  B3 B3+(-3)B1  2 1 1 : 1 
 3 0 2 : 5  0 3  1 :  1
   

1 1 1 : 2  1 1 1 :
2 
   
B2B2+(-2)B1  0 3  1 :  3  B3 B3+(-1)B2  0 3  1 :  3
 0 3  1 :  1 0 0 0 : 2 
  
1 1 1 : 2  1 1 1 : 2
   
1
B2 B2  0 1  1 :  1 B3 B3  0 1  1
1 :  1
3 3 2 3
0 0 0 : 2  0 0 0 : 1 
 

Now B is changed in to row echelon form.

Step 4. The rank of A = 2 (The left hand of the vertical bar) and the rank of B = 3, the system
has a solution. Since
rank of A < rank of B , the system has no solution

Addis Ababa University , CNCS 63


Introduction to Linear Algebra , Matrices

Activity 2.6.2
1. Solve
2x - y +z = 3
x + y -3z = 1
x +2y =2z = -11
2. . Solve
x - y +z = 6
2x + y +3z = 1
x +y -3z =1
3. . Solve
x +y-z =1
3x - y = 5
2x-2y +z = 3

Inverse of a matrix for solving Systems of linear equations

Suppose A is an nxn matrix. Our aim is now to solve the equation Ax =b which is a
system of n equations in n unknowns. Suppose that A is invertible . Then A-1 exists and
we can multiply Ax =b by A-1 on both sides.We obtain

A-1(Ax) = A-1b

(A-1A)x = A-1b

Ix = A-1b

x = A-1b.

Moreover, x = A-1b is clearly a solution to the given linear system. Thus if A is invertible
, the solution is unique .

Using the above property ,

Theorem 2.6.2. If A is an nxn matrix, the homogeneous system

Ax = 0

has a nontrivial solution if and only if A is noninvertible.

Example 2.6.5: Solve


x + 2z = 1
x + 3z = -1
Solution

First write in the form of AX = b

Addis Ababa University , CNCS 64


Introduction to Linear Algebra , Matrices

1 2  x 1
A=   , X=   , b =  
1 3 z  1

By using elementary row operations , we can find


 3  2
A-1 =  
 1 1 
 x  3  2  1   5 
  = A-1b =     =  
z  1 1   1   2 
Hence x = 5, z = -2 .

Example 2.6.6 : Solve


x - y + 2z = 1
y - 3z = 2
3x +3y -z = 0

Solution

First write in the form of AX = b

1  1 2   x 1
   
A= 0 1  3 , X =  y , b =  2
3 3  1 z 0
   

By using elementary row operations , we can find

 8  5 1
A = 1  9  7 3
-1
11
  3  6 1

 x  8  5 1  1   2 
       
 y  = A b = 111  9  7 3  2  = 111   23 
-1

z   3  6 1  0    15 
   

Activity 2.6.3 Solve the following systems of linear equations using the inverse of a matrix.

1. Solve
x–y=2
2x + y = 1

2. x +2y - z = -2
2x – y + z = 5
-x +y+ z = 2

Addis Ababa University , CNCS 65


Introduction to Linear Algebra , Matrices

exercises
 1  1
  1 1 0
1.Let A =  2 3  and B =   .
 0  1  2 1 1
 
Find a. AB.
b.At
c.Bt
d.Bt At
e. The rank of A
2. Consider the matrix
 3 1 2
A=  1 2 0
 2 7 4
is A a symmetric matrix?
1. Consider the matrix
2 1 1
A=   1  3 5

 2 6 1
Write A as a sum of symmetric and antisymmetric matrices..
4.Determine whether the matrices are in row or reduced row echelon forms.
 1 2 0 0
 
1 2 0 0 1 5 6 2  0 0 1 0
A= 0 0 0 0 , B = 0 0 0 0 ,C =  0 0 0 1  .
 
0 1 0 0 0 0 0 0  0 0 0 0
 0 0 0 0
 
5. Find the inverse of the following matrices.
 1  1
a. A=  
2 4 
2 1 0
b. A = 0 2 3
0 0 2
2 3 5
c. A = 1  2 3
3  4 2
6.Find the rank of the matrix

Addis Ababa University , CNCS 66


Introduction to Linear Algebra , Matrices

 2 3 1  1
 
A=  1  2 0 1 
5  3 1 2 
 
7. Solve
2x + y + 2z = 3
3x – y + 4z = 7
4x + 3y + 6z = 5
8. Find for what values of  and  , the system
2x + 4y + ( + 3)z = 2
X + 3y + z =2
( - 20x + 2y + 3z = 
is consistent .
9. Solve
2x +6y +z = -1
3x + 9 y + 2z = -1
-y +3z = 4
10.Let A be a 3x5 matrix and B be a 5x5 matrix .What is the size of AB?

11. Let A and B square matrices of the same order which of the following is true?
A. (A + B)-1 = A-1 + B-1
B. AB = 0  |A| = 0 or |B| = 0
C. AB = 0  |A| = 0 and |B| = 0
D. (AB)-1 = A-1 B-1
12.Solve
x +2y =2
3x + 6y - z = 8
x+2y +z = 0
2x +5y -2z = 9
13.a. List all possible forms of 2x 2 reduced row echelon forms.
b. List all possible forms of 3 x 3 reduced row echelon forms
 a  b c  d  8 6
14.If   =   , find a,b,c,d
c  d a  b   4 2
1 0  0 1
15. Verify that A =   and B =   are two symmetric matrices such that AB is
 0 1 1 0
Skew symmetric.
 a 0 0
16.Let A = 0 b 0 where a 0, b 0 and c 0.Find the inverse of A.
0 0 c 
 5  1
17.If A-1 =   , find A
2 3 

Addis Ababa University , CNCS 67


Introduction to Linear Algebra , Matrices

1 0 2   11 2 2 
18.Show that A= 2  1 3 is the inverse of B = 4 0 1 .
 
4 1 8  6  1  1
1 2 0 
19.Let A =   . Find
3 1 4
a. A.At b. At .A

1 2 
20.Let A =   . Find a) A2 b) A3
4  3
1 3   x
21.Let A =   . Find a non zero vector vector u =   such that Au =3u
4  3   y
1 2
22.Let A =   .Find An
0 1
1 3 4
23.Find the inverse of A =  3  1 6

 1 5 1

Addis Ababa University , CNCS 68

You might also like