You are on page 1of 17

Topic One: Matrices

a. Introduction to matrices

Matrices are used as a shorthand for keeping essential data arranged in rows and columns i.e
matrices are used to summarize data in tabular form.
Definition: A matrix is an ordered rectangular array of numbers, usually enclosed in
parenthesis or square brackets. Capital (Upper – case) letters are used to denote matrices.
Order of a Matrix
The size of a Matrix is specified by the number of rows (horizontal) and the number of columns
(vertical).
A general matrix of order m  n is
 a11 a12  a1n 
a
A =  21
a 22  a 22  = a ij 
   i → ith row
 
a n1 a n 2  a mn  j → jth column

A Square Matrix is a one with the same number of rows as columns i.e. 𝑚  𝑚 matrix. Two
matrices are of the same size if they have the same order. The diagonal that runs from top left
to bottom right is called the leading (main) diagonal. The matrix whose only non-zero entries
are on the leading diagonal is called diagonal matrix. A vector is a matrix with one row (1  𝑛)
or one column (𝑛  1). A row vector is of the form 1  n, and a column vector is of the form
m  1. A zero matrix of order 𝑚  𝑛 is the matrix with a ij = 0 i = 1,  m, j = 1 n .
Similarly we talk of zero rows and column vector.

0 
0 
 

 
0 = (0,0,  0 ) or 0

Equal Matrices: Two matrices A & B are said to be equal if they have the same order (size)
𝑚  𝑛 and aij = bij i & j
 a11 a12  a1n 
a a 22  a 22 
A =  21
  
 
a n1
an2  a mn 
A square matrix is said to be triangular if 𝑎𝑖𝑗 = 0 ∀ 𝑖 > 𝑗 or ∀ 𝑖 <
𝑗.
Examples
1 2 3
1 0
(0 4 5) is a 3  3 upper triangular matrix while ( ) is a 2  2 lower triangular matrix.
3 4
0 0 7

b. Algebra and operations, sums and products of matrices,

Addition and Subtraction of matrices


This is performed on matrices of the same order (size). Let A and B be 𝑚  𝑛 matrices.

A + B =  aij   bij  =  aij  bij  = cij  ( m  n )


Scalar Multiplication
This is performed on any matrix and the resulting matrix is of the same size.
c A = c  aij  = caij 
Each entry is multiplied by same number (scalar).
→ →
Dot product: let a and b be any two vector of size n (matrices with a single column or row).
→ →
a =  a1 , a2 , an  , b = ( b1 , b2 , bn )
→ → → →
The dot product of a & b denoted a  b , is given by
→ → n
a  b = a1b1 + a2b2 + + anbn =  a i bi
i =1
The dot product is also scalar product. Dot product of a row & column vector of order n is as
follows;
 b1 
b  n → →
( a1 , a2 an )   = a1b1 + a2b2 + + anbn  aibi = a  b
 2
=
i =1
 
bn 

Matrix Multiplication:
Let A = aik  be an m  n matrix, and B = bkj  an n  s matrix. The matrix product AB is
the m  s matrix C =  cij  where c ij the dot product of the ith row of A and the jth column of
B.
n
AB = C ,  aik  bkj  = cij  ; C ij = Ai  B j = a ik bkj
k =1
Remark:
1.Let A ( m  n ) , B ( s  r ) be two matrices.
C = AB exists iff n = s & C is m  n
C = BA exists iff r = m & C is s  n
2. It’s possible for AB to be defined while BA is not defined. i.e. matrix multiplication is not
commutative.

Examples

1 − 2 3   3 0 2
1. Let A =   and B =   . Then
 4 5 − 6 − 7 1 8

 1 + 3 − 2 + 0 3 + 2   4 − 2 5
A + B =   =  
 4 − 7 5 + 1 − 6 + 8  − 3 6 2
 3  1 3  (− 2) 33   3 −6 9 
2. 3A =   = 
3  4 35 3  (− 6 ) 12 15 − 18 
2 − 4 6  −9 0 − 6  − 7 − 4 0 
3. 2 A − 3B =   +   =  
 8 10 − 12   21 − 3 − 24   29 7 − 36 

 1 2  1 1   1  1 + 2  0 1  1 + 2  2   1 5 
4.    =   =  
 3 4  0 2   3  1 + 4  0 3  1 + 4  2   3 11

 1 1  1 2   11 + 1 3 1 2 + 1 4   4 6 
   =   =  
 0 2  3 4   0 1 + 2  3 0  2 + 2  4   6 8 
The above example shows that matrix multiplication is not commutative, i.e. the products
AB and BA of matrices need not be equal.
Exercise
1 3   2 0 − 4
1. Let A =   and B =   . Find (a) AB , (b) BA
 2 − 1   3 − 2 6 

1 − 2 0 
2. Given A = (2,−1) and B =   , find (a) AB , (b) BA
 4 5 − 3

 2 − 1
  1 − 2 − 5
3. Given A =  1 0  and B =   , find (a) AB , (b) BA
−3 4  3 4 0 
 

c. Transpose of a matrix

The transpose of the matrix A is matrix B = AT , such that bij = a ji i.e. the rows
become columns and vice versa.

1. If A = AT , we say A is symmetric. (only for a square matrix). If A is


symmetric,
a) A AT and A + AT are symmetric.
b) A k symmetric  k
c) If A, B are symmetric,  A + BA is symmetric.
2. If AT = − A , we say A is skew symmetric. In that case,
(a) A − AT is skew symmetric
(b) If A, B are skew symmetric,  4 + B A is skew symmetric.
3. If A, S are n  n (square) matrices and A is symmetric, then S T A S , S A S T
are symmetric
4. Every square matrix can be expressed as the sum of a symmetric &
Skew-symmetric matrix. i.e.
1
A=
2
( 1
)
A + AT + A − AT
2
( )
1
S ( A) =
2
(
A + AT ) is the symmetric part; K ( A) = A − AT
1
2
( )
is the skew-
symmetric part.

5. If
( )
A is n  n and f ( x ) any polynomial, then f AT =  f ( A)
T

Exercise
1 0 1 0
 
1. Find the transpose A of the matrix A =  2 3 4 5 
t

 4 4 4 4
 

1 2 0
2. Let A =   . Find (a) AA , (b) A A
t t

3 −1 4

d. Identity matrix

A square diagonal matrix whose main diagonal entries are all 1s is called an identity matrix
denoted by 𝐼𝑛 where 𝑛 stands for the order i.e. 𝑛 × 𝑛 . 𝐼𝑛 is said to be an identity matrix if

𝐼𝑛 × 𝐴 = 𝐴 × 𝐼𝑛 = 𝐴, ∀ matrix 𝐴

Example

1 0 1 2 1 2 1 2 1 2
( )( )=( )( )=( )
0 1 3 4 3 4 3 4 3 4
1 0 0
1 0
Therefore, ( ) is an 𝐼2 identity matrix. Similarly, (0 1 0) is an 𝐼3 identity matrix
0 1
0 0 1

e. Properties of Matrix operations


i. A + B = B + A - Addition is commutative
ii. ( A + B ) + C = A + (B + C ) - Addition is associative
iii. A + 0 = 0 + A = A, 0 is the identity for addition
iv.  ( A + B ) = A + B , left distributive law.
v. ( +  )A = A + A , right distributive law
vi. (  )A =  (A) , associativity of scalar multiplication
vii. ( A)B = A( ) − scalar pull through
viii. ( A B ) C = A(BC ) - associativity of matrix multiplication
ix. 1n A = A , AI m = A , A ( m  m ) - identity matrix
x. A(B + C ) = AB + AC , left distributive law
xi. ( A + B ) C = AC + BC , right distributive law
xii. (A )T T
=A
xiii. ( A + B )T = AT + B T - transpose of the sum=sum of transpose
xiv. ( AB)T = B T AT - transpose of product = product of transpose
Remark: Proof of most of these properties involve routine computations.
Example
Show that ( A − B )( A + B ) = A 2 − B 2 iff AB = BA i.e A & B commute
Solution:
 Suppose ( A − B )( A + B ) = A 2 − B 2 and show that A & B commute.
A 2 − B 2 = ( A − B )( A + B )
= A( A + B ) − B( A + B )
= A 2 + AB − BA − B 2
Hence AB − BA = 0 ; AB = BA and so A & B commute.
 Assume A & B commute & show that ( A − B )( A + B ) = A 2 − B 2
Since A & B commute AB = BA
( A − B ) ( A + B ) = A( A + B ) − B( A + B )
= A 2 + AB − BA − B 2
but AB = BA; = A 2 + AB − AB − B 2 = A 2 − B 2

f. Inverse, singular matrices and adjoint matrices

Let A be a square matrix. Another matrix B of the same order as A is called an inverse of A if

𝐴𝐵 × 𝐵𝐴 = 𝐼𝑛

If matrix A has an inverse, then A is said to be a non-singular or invertible matrix. Otherwise,


it is a singular matrix.

Example

2 3 2 −3 1 0 2 −3 2 3
( )( )=( )=( )( )
1 2 −1 2 0 1 −1 2 1 2
2 3 2 −3
Therefore, ( ) and ( ) are inverses of each other.
1 2 −1 2

g. Determinant of a matrix

a a12  a a12
Let A =  11  . Det A = 11 = a11 a22 − a12 a21 . The determinant is a scalar.
a 21 a 22  a21 a22

Examples:
 
1. Find the value of  such that = 0.
3 −2
1+ x 1
2. Let = find x.
2 + 2x 2
x 3
3. Let = 4 . Find x.
2 2x + 1
 a11 a12 a13 
Let A = a 21 a 22 a 23 
 a 31 a 32 a 33 

a11 a12 a12


a a23 a a23 a a22
det A = a21 a22 a23 = a11 22 − a12 21 + a13 21
a32 a33 a31 a33 a31 a32
a31 a32 a33
= a11 (a 22 a33 − a 23 a32 ) − a12 (a 21a33 − a 23 a31 ) + a13 (a 21a32 )
= a11 a 22 a33 − a11 a 23 a32 − a12 a 21 a33 + a12 a 23 a31 + a13 a 21 a32 − a13 a 22 a31
= a11 a 22 a33 + a12 a 23 a31 + a13 a 21 a32 − a11 a 23 a32 − a12 a 21 a33 − a13 a 22 a31

Note: This is a sum of 6 products, 3 positive and 3 negative. Each product has exactly one
factor from each row and column.
3 1 2
1. Evaluate − 1 − 1 4
− 2 −1 1
3 1 2
Solution: − 1 − 1 4 = 3[( −1)1 + 1( 4 )] − 1[−1(1) + 8] + 2[1 − 2] = 0
− 2 −1 1

1 3 1
2. Evaluate 2 1 2
1 −1 2
1 3 1
1 2 2 2 2 1
Solution: 2 1 2 =1 −3 +1 = 1(4 ) − 3(2 ) + 1(− 3) = − 5
−1 2 1 2 1 −1
1 −1 2
4.2.1 Properties of determinants
1. Det (AB) = Det A . Det B

2. If one row or column of A is multiplied by scalar r to get B, det (B) = r det A

3. If row i = 0 or column j = 0, det A =0.


4. For an n  n matrix, det (r A) = r n det A

5. If two rows or columns are identical det A = 0

6. If one row or column is a scalar multiple of another, det A = 0.

7. Adding a scalar multiple of a row or a column to another row or column respectively leaves

the determinant unchanged.

Inverse of a 2 X 2 matrix
a b  1  d − c
Let A =   det A = ad − bc  0 ; A −1 =
c d  ad − bc − c a 
Note:
1 a b   d − b 1 ad − bc − ab + ab  1 0
A A −1 = = = ad − bc  0
ad − bc  c d  − c a  ad − bc cd − cd sd − bc  0 1
   

Let A =  aij  be a square matrix. The classical adjoint of A is the matrix


T
( )
adj ( A ) =  aij  , a ij ' = (− 1) det Aij where a ij is the (i, j ) cofactor of A.
i+ j

1
A −1 = adj ( A )
det ( A)

 a b   a11 a12 
For a 2 x 2 matrix A =  = 
 c d   a21 a22 
T
 a11 ' a12   d − c  d − b  d − b
T
1
Adj(A) =   =   ; A −1 =
ad − bc − c a 
=  
a 21 ' a 22 ' − b d  − c a 

Inverse of a 3 X 3 matrix

T T
 a11 a12 a13   a11 ' a12 ' a13 '  A11 − A12 A13 
Let A = a 21 a 22 a 23  ; Adj (A) = a ' a ' a ' =  − A A22

− A23 
 21 22 23   21

 a11 a 32 a 33   a 31 ' a 32 ' a 33 '  A31 − A32 A33 


a a 23 a a 23
A11 = 22 = a 22 a 33 − a 23 a 32 ; A12 = 21 = a 21 a 33 − a 23 a 31
a 32 a 33 a 31 a 33
a 21 a 22 a a13
A13 = = a 21 a 32 − a 22 a 31 ; A21 = 12 = a12 a 33 − a13 a 32
a 31 a 32 a 32 a 33
a11 a13 a11 a12
A22 = = a11 a 33 − a 31 a13 ; A23 = = a11 a 32 − a12 a 31
a 31 a 33 a 31 a 32

a12 a13 a a13


A31 = = a12 a 23 − a13 a 22 ; A32 = 11 = a11 a 23 − a13 a 21
a 22 a 23 a 21 a 23
a11 a12 1
A33 = = a11 a 22 − a12 a 21 ; Det A = a11 A11 − a12 A12 + a13 A13 ; A −1 =
a 21 a 22 det A
adj(A)

4 0 1
Examples: Find the inverse of A = 2 2 0
3 1 1
Solution:
2 0 2 0 2 2
Det A = 4 −0 +1 = 4(2 ) − 0 + 1 (2 − 6 ) = 8 − 4 = 4 ; Therefore, A −1 exists.
1 1 3 1 3 1

T
 A11 − A12 A13 
 
adj ( A) = − A21 A22 − A23  2 0 2 2
 A31  A11 = =2 A13 = = −4
− A32 A33 1 1 2 0 3 1
;
; A12 = = 2; ;
3 1
0 1 4 1 4 0 0 1
A21 = = −1 ; A22 = = 1 ; A23 = = 4 ; A31 = =−2
1 1 3 1 3 1 2 0
 2 − 2 − 4 1 − 2
T
 2
A32 =
4 1
= −2 A33 =
4 0 
= 8 = 8 adj ( A) =  1  
1 − 4 =  − 2 1 2  ;
2 0 2 2
− 2 2 8  − 4 − 4 8 
 12 1
4 − 12 
A −1 = − 12 14 1 
2 
 − 1 − 1 2 
Exercise
−1
1. Find A if
 2 3 − 4
 
A = 0 − 4 2 
 1 −1 5 
 

Echelon form of a matrix


A m  n matrix B is said to be in row echelon form if it is of the form.
b11 b12 b13  b1n 
0 b b23  b xn 
 22 
0 0 b33  b3n 
 
B=      if m  n
0 0  bii  bin 
 
   
0 0  bmm bmn 

b11 b12 b13  bin 
0 b22 b23  b2 n 

0 0 b33  b3n 
 
B=     if n  m
0 0 0  bnn 
 
0 0 0  0 
0   0 
 0

b11 b12  bin 


0 b22  b2 n 

  
B=  m=n
   
 
 
  bnn 

Note:
For a matrix in echelon form, for subsequent rows, the non-zero entries occur in later and later
columns.

For a matrix in echelon form, all entries below the main diagonal are zero. Given any matrix
B (not in echelon form) we perform the following elementary row operations to change it to
echelon form:
1. Change the order of the rows (interchange some rows)
2. Multiply one row by a nonzero constant.
3. Add a multiple of one row to a nonzero multiple of another row.
Example
1 − 2 1 
 
1. Reduce the matrix  2 1 − 1 to echelon form
7 − 4 1 
 

Inverse of a matrix (row reduction method)

The inverse of a matrix a can be found using row reduction to echelon form of the augmented
(
matrix (A/I) to get I / A −1 . )
Example:
4 0 1
Find the inverse of A = 2 2 0
3 1 1

Solution:
4
0 1 1 0 0 4 0 1 1 0 0
   
2 0 0 1 0 2 R2 − R1
2 →  0 4 −1 −1 2 0 
3
1 1 0 0 1 4 R3 − 3R1  0 4 1 −3 0 4  R3 − R2
40 1 1 0 0  2 R1 − R3 8 0 0 4 2 −4  R1 8
   
04 −1 −1 2 0  2 R2 + R3 → 0 8 0 −4 2 4  R 2 8
 0
0 2 −2 −2 4  0 0 2 −2 −2 4  R 3 2
1 0 0 12 1
4 − 12   12 1
4
− 12 
 
→ 0 1 0 − 1 2 1 4 1 2  ; Inverse − 12 14 1 
2 
0 0 1 −1 −1 2   − 1 − 1 2 

Reduced row-echelon form


Definition: A matrix is said to be in reduced row echelon form (canonical form) if:
1. Each nonzero row begins with a pivot entry 1. (Leading 1 of the row)
2. The rest of the columns containing the pivot entry 1 consists of 0s.
3. In subsequent rows, the pivot entries occur in later and later columns.
4. The all-zero rows are at the bottom (they are the unused rows).

Examples
3 4 − 1 1
1. Reduce 1 − 1 3 1 to reduced row-echelon (canonical) form.
4 − 3 11 2

3 4 − 1 1 1 − 1 3 1 
Solution: 1 − 1 3 1 R1  R2  3 4 − 1 1  R − 3R
  2 1

4 − 3 11 2 4 − 3 11 2 R3 − 4 R1


1 −1 3 1 1 −1 3 1  R1 + R2
   10 2
→ 0 7 −10 −2  R2 7 → 0 1 − − 
0 7 7
0 −1 −1 −2 
 − 1 − 1 − 2  R3 + R2
1 0 117 5
7 1 0 117 7 
5
R1 − 117 R3 1 0 0 − 17
13

 2
→ 0 1 − 107 − 
2
7
→ 
0 1 − 7 − 7  R2 + 7 R3 → 0 1 0 17 
10 10 18 

0 0 − 177 −  − 177 R3


16
7
0 0 1 16 
17 
0 0 1 17
16 

2. Reduce to echelon form


1 2 3 1 1 2 3 1 
2 1  
2 0 R2 − 2 R1 0 − 3 − 4 − 2
 → →
− 1 − 2 − 1 1 R3 + R1 0 0 2 2
   
 1 − 1 3 4 R4 − R1 0 − 3 0 2  R4 − R2
1 2 3 1  1 2 3 1 
0 − 3 − 4 − 2  0 − 3 − 4 − 2 
  → 
0 0 2 2 0 0 2 2
   
0 0 4 4  R 4 − 2 R3 0 0 0 0 
Exercise
2. Determine if the following matrices are in echelon canonical form or not.
1 0 0 0 0 5 8 7 − 3
1 0 0 1 7 5 − 2 0  0 0 1 0 6  0 0
 0 0 1 3 0 3 1     2 1 
1
(a)   (b)   (c) 0 1 0 0 3 (d) 0 0 0 0
0 0 0 0  0 0 4 − 6    
     0 0 0 1 0 0 0 0 4
0 0 0 0  0 0 0 2
0 0 0 0 0 0 0 0 0 

Topic Two: Linear equations


a. Solution of linear equations,

A Linear equation is an equation of the form


a1 x1 + a 2 x 2 +  + a n x n = b
a1 , a 2 , , a n , b are constants while x1 , x 2 ,  x n are the variables to be determined. A solution
to the equation is an n-tuple (c1 , c 2 , , c n ) such that
a1 c1 + a 2 c2 +  + a n cn = b
Example: 1
5x − 3x2 + 6 x3 − 4 x2 = 10 ; x1 = 3 ; x2 = 5 ; x3 = 3 ; x4 = 2 . i.e. (3,5,3,2) is a
solution.
Two systems of equations are equivalent if they have the same solution set. We get equivalent
system if we perform any of the following:
1. Change the order of listing the equations
2. Multiply one or more equations by a non-zero constant.
3. Add a multiple of one equation to a multiple of another equation.
There are various methods of solving a system of linear equations

i) Elimination Method:
The strategy is to eliminate one variable at a time:
Example:
Solve by elimination method
x1 + x2 + x3 = 5  (1)
x1 + 2 x 2 + 3x3 = 10  (2)
2 x1 + x 2 + x3 = 0  (3)
Solution:
Eliminate x1
(2) – (1) x 2 + 2 x3 = 5 (4)
(3)-2(1) - x2 − x3 = −4 (5)
Eliminate x2
(4) +(5) 3
x =1
Substitute in equation 5
− x − 1 = −4 , x2 = 3
2
Substitute in equation 1
x1 + 3 + 1 = 5, x1 = 1
The elimination method is very tedious when there are many variables. We use a much
organized elimination method in matrix form called Gauss-Jordan method.

ii) Gauss-Jordan elimination method


Given a linear system
a11 x1 + a12 x2 +  + a1n x n = b1
ax1 x1 + a 22 x 2 +  + a 2n x n = b2

a n1 x1 + a n 2 x2 +  + a nn xn = bn
The system can be represented in matrix form
 a11 a12  a1n   x1   b1 
a     
 21 a 22  a 2 n   x 2  = b2 
    
     
a n1 a n 2  a nn   x n  bn 
Or simply Ax = b
Where A is the n  n is the coefficient matrix
x = (x1 , x 2  x n ) , b = b1 , b2  bn 
T T

An augmented matrix is the matrix A b


The Gauss-Jordan method involves reducing the augmented matrix to reduced row echelon
form.

Example:
Solve using Gauss-Jordan method
2 x1 − 4 x 2 + 6 x3 = 20
3x1 − 6 x2 + x 3 = 22
− 2 x1 + 5x 2 − 2 x3 = − 18
Solution:
Matrix form
 2 −4 6   x1   20 
 3 −6 1  x   22 
   2  
− 2 5 − 2  x 3  − 18
=
Augmented matrix
 2 − 4 6 20 
 
 3 − 6 1 22 
− 2 5 − 2 − 18
1
Divide row 1 by 2 i.e. 2
R1 and use it to reduce a 21 and a31 to zeros
1 −2 3 10 
 
3 −6 1 22  R2 − 3R1
 −2 5 −2 −18 R3 + 2 R1
1 −2 3 10 
 
0 0 −8 −8
0 1 4 2 
R2  R3
1 −2 3 10 
 
0 1 4 2  R1 + 2 R2
0 0 −8 −8

1 0 11 14  8R1 + 11R3 8 0 0 24  R1 / 8
   
0 1 4 2  2 R2 + R3 0 2 0 −4  R2 / 2
0 0 −8 −8 0 0 −8 −8 R3 / − 8

1 0 0 3 
  x1 = 3, x2 = −2, x3 = 1
0 1 0 − 2 Solution
0 0 1 1 

The general procedure to solve Ax = b by Gauss-Jordan method is as follows:


1. Get the augmented matrix A b  
2. Get 1 in (1,1) position of matrix by
a) rearranging the rows
b) dividing row 1 by all  0
3. Get zeros in all other positions of column 1
4. Get 1 in (2,2) position by rearranging rows or dividing all of row 2 by a 22  0
5. Get zeros in all other positions of column 2.
6. Get 1 in (3,3), (4,4)… and in each case get zeros in other positions of that column.
7. Each row gives the solution
 
 ci 
 
 I c2  x1 = c1 ; x2 = c2 ,...xn = cn
 : 
:
 
 cn 
A system of linear equations may have a unique solution, many solutions or no solution.
 
Unique solution: A b reduces to (I c )
No solution: The last row is a form 00 a  0
Many solutions: Some variables can be written in terms of others

Exercise

Solve the following system by Gauss Jordan (elimination) method.


1. x1 − x 2 + x3 + 2 x 4 = 1
2 x1 − x2 + 3x4 = 0
− x1 + x2 + x3 + x4 = −1
x2 + x4 = 1

2. x1 + x 2 + x3 + x 4 = 4
x1 + 2 x 2 − x3 − x 4 = 7
2 x1 − x 2 − x3 − x 4 = 8
x1 − x2 + 2 x3 − 2 x4 = −7

3. x1 + x2 + 2 x3 + x4 = 3
x1 + 2 x2 + x3 + x4 = 2
x1 + x2 + x3 + 2 x4 = 1
2 x1 + x2 + x3 + x4 = 4

4. X1 − X 2 + 2X 3 = 2
2 X 1 + 3 X 2 − X 3 = 14
3 X 1 + 2 X 2 + X 3 = 16
X 1 + 4 X 2 − 3 X 3 = 12

iii) Cramer’s rule,

This method uses determinants to solve a linear system Ax = b provided det A (coefficient
matrix) is nonzero.

1
Suppose det A  0 , A square matrix x = A −1b, A −1 = adj ( A)
det A
T
 A11 − A21   a11 a21 an1 
 
1  − A12 A22  1  
; Let a ij = (− 1)
i+ j
−1
A = Aij ; A−1 =  a12 a22 an 2 
det A   det A  
   a1n a2 n ann 
 
 x1   b1 
x  b 
 2  2
  a11 a 21  a n1  
     
 xn  = 1 a12 a 22 an2  bn 
det A     
 
a1n a 2n a nn 
1
xj = b1 a1 j + b2 a2 j + + bn anj 
det A 

But b1 aij + b2 a2 j + + bn anj is the determinant of the matrix


 a11 a12  a ij −1  a1n 
b1 a ij +1
a a 22  a1 j −1  a 2 n 
b2 a 2 j +1
 21
     
 
 
a n1 an2  a nj −1  a nn 
bn bnj +1
i.e. matrix A with column j replaced with ( b1 , b2, bn ) . The expansion is done along
column j. Note that the determinant of A expanded along column j is
a1 j a ij + a 2 j a 2 j +  + a nj a nj
Thus by replacing columns j by b1 , b2 bn  we have the determinants of the new matrix.

For 3  3 matrix Ax = b
 a11 a12 a13   x1   b1 
a a 22 a 23   x 2  = b2 
 21
 a 31 a 32 a 33   x 3  b3 

b1 a12 a13 a11 b1 a13


b2 a22 a23 a21 b2 a23
b a32 a33 a b3 b33
X1 = 3 X 2 = 31
a11 a12 a13 a11 a12 a13 a11 a12 b1
a21 a22 a23 a21 a22 a23 a 21 a 22 b2
a31 a32 a33 a31 a32 a33 a 31 a 32 b3
X3 =
a11 a12 a13
a 21 a 22 a 23
a 31 a 32 a 33

Example
Solve the linear system using Crammer’s rule
− 2 x1 + 3x2 − x3 = 1
x1 + 2 x2 − x3 = 4
− 2 x1 − x2 + x3 = −3
Solution
1 3 −1
4 2 −1
− 3 −1 1 −4
− 2 3 −1 x1 = = =2
A −2
A= 1 2 − 1 = −2 .Then ,
− 2 −1 1
− 2 1 −1
1 4 −1
−2 −3 1 −6
x2 = = =3
A −2
,
−2 3 1
1 2 4
− 2 −1 − 3 −8
x3 = = =4
A −2
And

iv) Inverse method,

Consider the system of linear equations represented in matrix form A x = b . Where A is an m


 n matrix.
If det A  0 , then A −1 exists and A −1 ( A x ) = A −1b ; Ix = x = A −1b . This method works only
 x1   c1 
x  c 
if det A  0 , and there is a unique solution  2
= A b = 2

   
   
 xn  cn 
Examples:
1. Solve the linear system using the inverse matrix
x + 2y = 6
4x + 3y = 3
Solution:
1 2   x  6  1 2  1  3 − 2
 4 3   y  =  3 ; A=  , det A = 3 − 8 = −5 ; A −1 = − − 4 1 
       4 3 5  
 x 1  3 − 2  6  1  12  − 12 5 
− 21 =  21  ; Solution: x = − 5 , y = 5
−1
 y = A b = − 5  − 4 1   3 = − 5
12 21
         5 
2. Solve the linear system using the inverse matrix
x1 + 3x2 + 2 x3 = 3
2 x1 + 4 x2 + 2 x3 = 8
x1 + 2 x2 − x3 = 10
Solution:
 −2 7 −1 
1 3 2   x1  3 1 3 2   4 2
2 4 2   x  =  8  ; A =  2 4 2  ; det A = 4; A−1 =  1 − 3 1 
   2      4 2 
1 2 − 1  x3  10  1 2 −1 0

1 − 1 
4 2

 x1  − 2 −1 
7
4 2 3  3 
x  =  1 − 3 8 =  2 ; x = −3
2      x1 = 3, x2 = 2 , 3
1
 2  4
 x 3   0 1 −1  10 − 3
 4 2
Exercise

Solve using Crammer’s rule.


1. 2x − 5 y + 2z = 7
x + 2 y − 4z = 3
3x − 4 y − 6 z = 5

x1 + 3x2 + 2 x3 = 3
2. 2 x1 + 4 x2 + 2 x3 = 8
x1 + 2 x2 − x3 = 10

3. Solve the following three equations using inverse matrix method


x + y + 2z = 1 x + 2y + z = 4
x + 2 y − z = −2 4. 3x − 4 y − 2 z = 2
x + 3y + z = 5 5 x + 3 y + 5 z = −1

You might also like