Ch6 Matrix, Determinant and System of Linear Equations
Ch6 Matrix, Determinant and System of Linear Equations
Ch6 Matrix, Determinant and System of Linear Equations
Chapter 6
Matrix, Determinant and System of Linear Equations
Page 2 of 114
Algebra on Matrix
1. Comparison of two matrices
Definition (Equality of matrices)
We say two matrices 𝐴 and 𝐵 are equal (i.e. 𝐴 = 𝐵) if and only if BOTH
the size of two matrices and ALL entries of two matrices are the same.
Example 2
2 3 2 3 1 1 −3 𝑏 −3 𝑎=2
( )≠( ), (1 4) ≠ ( ), ( )=( )⇒{ .
1 4 1 −4 4 0 𝑎 0 2 𝑏=1
Remarks
Different from real number, we cannot say whether one matrix is bigger / smaller
than another matrix. We cannot say
𝐴 > 𝐵 or 𝐴 < 𝐵.
Page 4 of 114
Example 3
2 1 0 1 2+0 1+1 2 2
( )+( )=( )=( ).
−1 3 2 −3 −1 + 2 3 + (−3) 1 0
2 1 1 2 2−1 1−2 1 −1
( )−( )=( )=( ).
−1 3 −1 0 −1 − (−1) 3 − 0 0 3
Page 5 of 114
According to the formula, the (𝑖, 𝑗)th entry of 𝐴𝐵 is formed by adding the product
of the some entries in 𝑖 th row of 𝐴 and 𝑗 th column of 𝐵.
𝑎11 𝑎12 ⋯ 𝑎1𝑝
𝑏11 ⋯ 𝑏1𝑗 ⋯ 𝑏1𝑛
⋮ ⋱ ⋱ ⋮
𝑏21 ⋱ 𝑏2𝑗 ⋱ 𝑏2𝑛
𝐴𝐵 = 𝑎𝑖1 𝑎𝑖2 ⋯ 𝑎𝑖𝑝
⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋮ ⋱ ⋮
(𝑏𝑝1
⋯ 𝑎𝑚𝑝 ) ⏟ ⋯ 𝑏𝑝𝑗 ⋯ 𝑏𝑝𝑛 )
(𝑎𝑚1
⏟ 𝑎𝑚2
𝑗 th column of 𝐵
𝑖 th row of 𝐴
[𝐴𝐵]𝑖𝑗 = ∑ 𝑎𝑖𝑘 𝑏𝑘𝑗 = 𝑎⏟𝑖1 𝑏1𝑗 + 𝑎⏟𝑖2 𝑏2𝑗 + 𝑎𝑖3 𝑏3𝑗 + ⋯ + 𝑎⏟𝑖𝑝 𝑏𝑝𝑗 .
𝑘=1 1st term 2nd term 𝑝th term
of each part of each part of each part
Page 7 of 114
Example 4
2 1 1 0
Compute the product ( )( ).
−1 3 2 7
Solution:
2 1 1 0
Let 𝐶 = ( )( ) be the product, the entries of 𝐶 are formed as follows:
−1 3 2 7
(1,1)th entry: 𝐶 = (2 × 1 + 1 × 2 = 4 ? ?) 2 1 1 0
( )( )
?? ?? −1 3 2 7
(1,2)th entry: 𝐶 = (? ? 2 × 0 + 1 × 7 = 7) 2 1 1 0
( )( )
?? ?? −1 3 2 7
?? ?? 2 1 1 0
(2,1)th entry: 𝐶 = ( ) ( )( )
−1 × 1 + 3 × 2 = 5 ? ? −1 3 2 7
?? ?? 2 1 1 0
(2,2)th entry: 𝐶 = ( ) ( )( )
? ? −1 × 0 + 3 × 7 = 21 −1 3 2 7
2 1 1 0 4 7
Hence, ( )( )=( ).
−1 3 2 7 5 21
Page 9 of 114
Example 5
0 1
1 0 −1
Compute the product ( ) (2 3 ).
−2 1 2
1 −1
Solution:
0 1
1 0 −1
According to the definition, the product 𝐷 = ( ) (2 3 ) is a 2 × 2
⏟−2 1 2
⏟1 −1
2×3 matrix
3×2 matrix
matrix. The entries of the product 𝐷 can be computed as follows
0 1
( ) 1 0 −1
)th
(1,1 entry: 𝐷 = (1 × 0 + 0 × 2 + −1 × 1 ? ?) ( ) (2 3 )
?? ?? −2 1 2
1 −1
0 1
)th
(1,2 ? ? 1 × 1 + 0 × 3 + (−1) × (−1) 1 0 −1
entry: 𝐷 = ( ) ( ) (2 3 )
?? ?? −2 1 2
1 −1
?? ?? 0 1
)th
(2,1 1 0 −1
entry: 𝐷 = ( ) ( ) (2 3)
(−2) × 0 + 1 × 2 + 2 × 1 ? ? −2 1 2
1 −1
Page 10 of 114
?? ?? 0 1
(2,2)th 1 0 −1
entry: 𝐷 = ( ) ( ) (2 3 )
? ? (−2) × 1 + 1 × 3 + 2 × (−1) −2 1 2
1 −1
Therefore, the product is given by
0 1
1 0 −1 −1 2
( ) (2 3 ) = ( ).
−2 1 2 4 −1
1 −1
Page 11 of 114
Example 6
0 −2
Compute the product (⏟1 2 3) (1 0 ).
1×3 matrix ⏟0 −1
3×2 matrix
Solution:
According to the definition, the product is a 1 × 2 matrix. The entries of the product
can be computed as
0 −2
(1,1)th entry: 𝐷 = (1 × 0 + 2 × 1 + 3 × 0 ? ?) (1 2 3) (1 0)
0 −1
0 −2
(1,2)th entry: 𝐷 = (? ? 1 × (−2) + 2 × 0 + 3 × (−1)) (1 2 3) (1 0 )
0 −1
Therefore the product is given by
0 −2
(1 2 3) (1 0 ) = ⏟
⏟ (2 −5) .
1×3 matrix ⏟0 −1 1×2 matrix
3×2 matrix
Page 12 of 114
Example 7
𝑎 0
Let 𝐴 = ( ), find the value of 𝐴2 and 𝐴3 . Guess the value of 𝐴𝑛 , where 𝑛 is
0 𝑏
any positive integer.
Solution
𝑎 0 𝑎 0 𝑎×𝑎+0×0 𝑎×0+0×𝑏 2
2
𝐴 =( )( )=( )=( 𝑎 0 ).
0 𝑏 0 𝑏 0×𝑎+𝑏×0 0×0+𝑏×𝑏 0 𝑏2
2 2 2 3
3
𝐴 =𝐴 𝐴=(2𝑎 0 ) (𝑎 0
)=(𝑎 × 𝑎 + 0 × 0 𝑎 × 0 + 0 × 𝑏 )=(𝑎 0 ).
2 2
0 𝑏2 0 𝑏 0×𝑎+𝑏 ×0 0×0+𝑏 ×𝑏 0 𝑏3
Following this pattern, we guess that
𝑛 𝑎𝑛 0
𝐴 =( ).
0 𝑏𝑛
Page 13 of 114
Example 8
−3 1 −6 2
2( )=( )
1 −1 2 −2
1 2 0 0
0( )=( )
−1 1 0 0
(*Note: The last matrix obtained is called “zero matrix”).
Page 14 of 114
Example 9
𝑇 0 −1 1 𝑇 0 1 −1
1 2 1 3
( ) =( ), (1 0 −1) = (−1 0 1 ).
3 4 2 4
−1 1 0 1 −1 0
Page 15 of 114
𝑎1 0 ⋯ 0 𝑛 (𝑎1 )𝑛 0 ⋯ 0
0 𝑎2 ⋯ 0 0 (𝑎2 )𝑛 ⋯ 0
( ) =( ).
⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋱ ⋮
0 0 ⋯ 𝑎𝑚 0 0 ⋯ (𝑎𝑚 )𝑛
For example:
2 0 0 4 24 0 0
(0 −1 0) = ( 0 (−1)4 0)
0 0 3 0 0 34
One has to be careful that the above formula can be applied to diagonal matrix
ONLY!
Page 19 of 114
Example 10
1 𝑥
Let 𝐴 = ( ). Suppose 𝐴 is symmetric, find the values of 𝑥. Is 𝐴 skew-
3 2
symmetric?
Solution
Intuitively, one may follow the method as in the single equation case and solve
for 𝒙 by multiplying the whole equation by the matrix 𝐴−1 :
𝑨−𝟏 (𝑨𝒙) = 𝑨−𝟏 𝒃 ⇒ (𝑨 −𝟏 −𝟏
⏟ 𝑨) 𝒙 = 𝑨 𝒃 ⇒ 𝒙 = 𝑨 𝒃
−𝟏
𝑰𝒏
𝑥 2 −2 1 −1 3
⇒ (𝑦) = (1 1 −1) (1).
𝑧 4 1 1 0
= 𝐴−1 𝐵 ⇒ 𝒙 = 𝐴−1 𝐵.
Such the matrix 𝐴−1 is called (multiplicative) inverse of the matrix 𝐴. In the
coming section, we shall study the inverse of a square matrix in more detail.
Page 23 of 114
𝐵𝐴 = 𝐴𝐵 = 𝐼𝑛
where 𝐼𝑛 is a 𝑛 × 𝑛 identity matrix. If such matrix 𝐵 exists, we denote this
matrix 𝐵 by 𝐴−1 .
Remark:
One has to be careful that the inverse of matrix is defined on square matrix only.
The inverse of a rectangular matrix (say 5 × 6 matrix) is not defined.
The inverse of some matrices may not exist (see example below). These matrices
are called singular matrices (or non-invertible matrix).
On the other hand, we say the matrix is non-singular (or invertible) if its inverse
exists.
Page 24 of 114
Example 11
2 1 −1 −1
Let 𝐴 = ( ) and 𝐵 = ( ) be two matrices.
−3 −1 3 2
(a) Find 𝐴𝐵 and 𝐵𝐴.
(b) Is 𝐴 non-singular (invertible)? Explain your answer.
Solution
(a) By direction calculation, we find that
2 × (−1) + 1 × 3 2 × (−1) + 1 × 2 1 0
𝐴𝐵 = ( )=( ).
(−3) × (−1) + (−1) × 3 (−3) × (−1) + (−1) × 2 0 1
(−1) × 2 + (−1) × (−3) (−1) × 1 + (−1) × (−1) 1 0
𝐵𝐴 = ( )=( ).
3 × 2 + 2 × (−3) 3 × 1 + 2 × (−1) 0 1
(b) Since 𝐴𝐵 = 𝐵𝐴 = 𝐼2 , hence 𝐵 is the inverse of 𝐴 (i.e. 𝐵 = 𝐴−1 ) and the
matrix 𝐴 is invertible.
Page 25 of 114
Example 12
0 0
Show that there is no inverse for zero matrix 0 = ( ).
0 0
Solution:
𝑎 𝑏
For any square matrix 𝑀 = ( ), we have
𝑐 𝑑
0 0 𝑎 𝑏 0×𝑎+0×𝑐 0×𝑏+0×𝑑 0 0
0𝑀 = ( )( )=( )=( ) ≠ 𝐼2 .
0 0 𝑐 𝑑 0×𝑎+0×𝑐 0×𝑏+0×𝑑 0 0
0 0
Since there is no matrix 𝑀 such that 0𝑀 = 𝐼2 , hence the inverse of 0 = ( )
0 0
0 0
does not exist. In other word, 0 = ( ) is singular (or not invertible)
0 0
Page 26 of 114
Solution:
IDEA: To show the matrix is invertible, one can rewrite the equation into the form
𝐴(? ? ) = (? ? )𝐴 = 𝐼𝑛 . Then (??) will be the desired inverse.
Note that
𝐴3 − 𝐴 + 𝐼𝑛 = 0 ⇒ 𝐴3 − 𝐴 = −𝐼𝑛
⇒ 𝐴 − 𝐴3 = 𝐼𝑛
⇒ 𝐴 (⏟𝐼𝑛 − 𝐴2 ) = (⏟𝐼𝑛 − 𝐴2 ) 𝐴 = 𝐼𝑛 .
?? ??
1. (𝐴−1 )−1 = 𝐴
1
1.2. (𝑐𝐴)−1 = 𝐴−1 where 𝑐 is any non-zero scalar.
𝑐
3. (𝐴𝐵)−1 = 𝐵−1 𝐴−1 (NOT 𝐴−1 𝐵−1 !)
Reason:
Since (𝐴𝐵)(𝐴𝐵)−1 = (𝐴𝐵)(𝐵−1 𝐴−1 ) = 𝐴𝐼𝑛 𝐴−1 = 𝐴𝐴−1 = 𝐼𝑛 .
4. (𝐴𝑇 )−1 = (𝐴−1 )𝑇 (i.e. you can reverse the order of inverse and
transpose.)
Page 28 of 114
Questions:
Is there any efficient way to check whether a given square matrix 𝐴 is non-
singular (invertible) or not? (i.e. Does its inverse exist?)
Is there any efficient way to find the inverse of an invertible matrix (instead of
trial by error)?
Example 14
2 3 1 0
det ( ) = 2(−4) − (3)(1) = −11, det ( ) = 1(3) − 2(0) = 3.
1 −4 2 3
Page 30 of 114
Example 15
1 0 2
Compute the determinant of 𝐴 = (1 1 2).
3 −1 1
Solution
Example 16
Compute the determinant
1 3 −2
det (0 0 3)
2 −2 4
(a) By expanding along the 1st row.
(b) By expanding along the 2nd row.
Solution:
(a) By expanding the determinant along the first row, we have
1 3 −2 𝑅1
det (0 0 3 )=⏞ 𝑎⏟11 𝐴11 + 𝑎⏟12 𝐴12 + 𝑎⏟13 𝐴13
2 −2 4 1 3 −2
0 3 0 3
= ⏟ 1 [(−1)1+1 det ( )] + ⏟3 [(−1)1+2 det ( )]
⏟ −2 4 ⏟ 2 4
𝑎11 𝑎 12
𝐴11 =(−1)1+1 𝑀11 𝐴12 =(−1)1+2 𝑀12
0 0
⏟ [(−1)1+3 det (
+ −2 )] = 1(6) + 3(6) + (−2)0 = 24.
⏟ 2 −2
𝑎 13
𝐴13 =(−1)1+3 𝑀13
Page 34 of 114
Remark
In this example, we observe that the computation is relatively easier if one expands
the determinant along the second row. It is simply because there are quite a number
of "0" in the second row so that one does not need to compute so many confactors
𝐴𝑖𝑗 .
Therefore, one should expand the determinant along the row (or column) with
largest number of "0" in it so that the computation cost is minimized.
Page 35 of 114
Example 17
0 2 3
Compute the determinant of 𝐵 = (0 1 2).
0 −1 2
Solution
Although one can obtain the answer by expanding along the 1st row, it may be
easier if one choose to expand along the 1st column.
Example 18
1 0 2 3
0 2 1 0
Compute the determinant of 𝐴 = ( ).
2 1 0 1
−1 1 1 0
Solution
We expand the determinant along the 2nd row:
𝑅2 0 2 1 0
⏞ 𝑎⏞
det 𝐴 = 21 𝐴21 + 𝑎⏞
22 𝐴22 + 𝑎⏞
23 𝐴23 + 𝑎⏞
24 𝐴24
1 2 3 1 0 3
= 2 × [(−1 )2+2 det ( 2 0 1)] + 1 × [(−1)2+3
det ( 2 1 1)]
−1 1 0 −1 1 0
2 3 1 2
= 2 × [2 × (−1)2+1 det ( ) + 1 × (−1)2+3 det ( )]
1 0 −1 1
1 1 2 1
−1 × [1 × (−1)1+1 det ( ) + 3 × (−1)1+3 det ( )] = ⋯ = −2.
1 0 −1 1
Page 37 of 114
1
There are two extra terms and
det 𝐴
the transpose 𝑇 above the matrix
Page 39 of 114
Example 19
1 3
Show that the matrix ( ) is invertible and find its inverse.
2 4
Solution
1 3
Step 1: Show that the matrix ( ) is invertible.
2 4
1 3 1 3
Note that det ( ) = 1 × 4 − 2 × 3 = −2 ≠ 0, so ( ) is invertible.
2 4 2 4
Step 2: To find the inverse, we first compute all cofactors, note that
𝐴11 = (−1)1+1 (4) = 4, 𝐴12 = (−1)1+2 (2) = −2,
𝐴21 = (−1)2+1 (3) = −3, 𝐴22 = (−1)2+2 (1) = 1.
Thus the inverse is given by
Example 20
1 −1 2
Let 𝐴 = (1 1 0 ) be a 3 × 3 matrix. Find the inverse of 𝐴 if it exists.
0 1 −1
Solution:
We first check whether the inverse exists by computing the determinant of 𝐴:
Example 21
3 2 6
Let 𝐴 = (1 1 2). Show that the matrix is invertible and find 𝐴−1 .
2 2 5
Solution:
Step 1: Show that the matrix is invertible.
𝑅1
1 2 1 2 1 1
Note that det 𝐴 =
⏞ 3 det ( ) − 2 det ( ) + 6 det ( ) = 1 ≠ 0. Hence the
2 5 2 5 2 2
matrix 𝐴 is invertible.
3 6 3 2
𝐴22 = (−1)2+2 det ( ) = 3, 𝐴23 = (−1)2+3 det ( ) = −2
2 5 2 2
2 6 3 6
𝐴31 = (−1)3+1 det ( ) = −2, 𝐴32 = (−1)3+2 det ( )=0
1 2 1 2
3 2
𝐴33 = (−1)3+3 det ( ) = 1.
1 1
Hence, the inverse is given by
Example 22
Using the inverse of matrix to solve the following system of linear equations
3𝑥 + 2𝑦 + 6𝑧 = 1
{ 𝑥 + 𝑦 + 2𝑧 = 3 .
2𝑥 + 2𝑦 + 5𝑧 = 1
Solution
One can rewrite the above system into the matrix form:
3𝑥 + 2𝑦 + 6𝑧 = 1 3 2 6 𝑥 1
{ 𝑥 + 𝑦 + 2𝑧 = 3 ⇒ (1 1 2) (𝑦) = (3).
2𝑥 + 2𝑦 + 5𝑧 = 1 ⏟2 2 5 𝑧 1
𝐴
1 2 −2
For Example 21, we know that 𝐴 is invertible and 𝐴−1 = (−1 3 0 ). Thus,
0 −2 1
𝑥 1 2 −2 1 5
(𝑦) = (−1 3 0 ) (3) = ( 8 ).
𝑧 0 −2 1 1 −5
Page 44 of 114
Remark of Example 22
This method only works for the system which the number of equations equals
the number of unknowns so that the coefficient matrix 𝐴 is a square matrix (say
in this example, we have 3 equations and 3 unknowns).
This method will fail when the number of unknowns does not match with the
number of equations. For example
𝑥
2𝑥 − 𝑦 + 𝑧 = 3 2 −1 1 3
{ ⇒ ( ) (𝑦) = ( ).
𝑥+𝑦+𝑧 =1 ⏟1 1 1 1
𝑧
not square matrix
or the coefficient matrix is not invertible
𝑥+ 𝑦=1 1 1 𝑥 1
{ ⇒ ( ) (𝑦) = ( ).
3𝑥 + 3𝑦 = 2 ⏟3 3 2
not invertible
To solve those equations, we shall apply a more general method (called Gaussian
Elimination) which will be discussed later.
Page 45 of 114
Example 23
3 1 1 3
Let 𝐴 = ( ) and 𝐵 = ( ).
−2 1 2 2
−1 0
(a) Show that 𝐴−1 𝐵𝐴 = ( ).
0 4
(b) Hence, evaluate 𝐵100 .
Solution:
Example 24
Let 𝑎⃗ = 5𝑖⃗ − 𝑘⃗⃗ and 𝑏⃗⃗ = 𝑖⃗ + 2𝑗⃗ − 𝑘⃗⃗ be two vectors, compute 𝑎⃗ × 𝑏⃗⃗.
Solution:
Using the fact in the previous fact, we obtain
𝑖⃗ 𝑗⃗ 𝑘⃗⃗
𝑎⃗ × 𝑏⃗⃗ = det (5 0 −1)
1 2 −1
0 −1 5 −1 5 0 ⃗⃗
= det ( ) 𝑖⃗ − det ( ) 𝑗⃗ + det ( )𝑘
2 −1 1 −1 1 2
= 2𝑖⃗ + 4𝑗⃗ + 10𝑘⃗⃗.
Page 49 of 114
1. If all the elements in a row (or column) are zero, then its determinant is 0.
𝑎1 𝑎2 𝑎3 𝑎1 0 𝑏1
det ( 0 0 0 ) = 0 and det (𝑎2 0 𝑏2 ) = 0
𝑏1 𝑏2 𝑏3 𝑎3 0 𝑏3
2. The sign of determinant 𝐴 is changed if one interchanges any two rows (or
columns)
𝑏1 𝑏2 𝑏3 𝑅1⟷𝑅2 𝑎1 𝑎2 𝑎3
det (𝑎1 𝑎2 𝑎3 ) = ⏞ − det (𝑏1 𝑏2 𝑏3 )
𝑐1 𝑐2 𝑐3 𝑐1 𝑐2 𝑐3
Example 26
Let 𝐴 be a square matrix with det 𝐴 = 5. Find the value of (i) det(𝐴𝑇 𝐴), (ii)
det(𝐴5 ) and (iii) det(𝐴−1 ).
Solution:
Using the properties of determinant (3 and 4), we obtain
Example 27
IDEA:
1 2 3 “Generate” some "0" in a particular row/
Compute det (4 5 6)
column so that the computation of
2 −1 3
determinant can be simplified.
Solution:
𝑅2 −4𝑅1
1 2 3 𝑅3 −2𝑅1 1 2 3
det (4 5 6) = ⏞ det (4 − 4(1) 5 − 4(2) 6 − 4(3))
2 −1 3 2 − 2(1) −1 − 2(2) 3 − 2(3)
1 2 3
= det (0 −3 −6)
0 −5 −3
𝐶1
−3 −6 2 3
⏞ 1 × [(−1)1+1 det (
= )] + 0 × [(−1)2+1 det ( )] + 0
−5 −3 −5 −3
2 3
× [(−1)3+1 det ( )]
−3 −6
= 1 × (−3 × (−3) − (−5) × (−6)) = 9 − 30 = −21.
Page 55 of 114
Example 28
1 −1 2 1
3 0 1 1 IDEA:
Compute the determinant det ( ) “Generate” some "0" in
1 −1 1 2
2 7 1 0 first row
Solution:
𝐶2 +𝐶1
𝐶3 −2𝐶1
1 −1 + 1 2 − 2 1−1
1 −1 2 1 𝐶4 −𝐶1
3 0 1 1 3 0+3 1−6 1−3
det ( ) =
⏞ det ( )
1 −1 1 2 1 −1 + 1 1 − 2 2−1
2 7 1 0 2 7+2 1−4 0−2
1 0 0 0 𝑅
1 3 −5 −2
3 3 −5 −2
= det ( )=⏞ 1 × det (0 −1 1)
1 0 −1 1
9 −3 −2
2 9 −3 −2
𝐶1
−1 1 −5 −2
=
⏞ 3 × det ( ) + 9 × det ( ) = 15 − 63 = −48.
−3 −2 −1 1
Page 56 of 114
Example 29
1 1 1
Factorize det ( 𝑎 𝑏 𝑐)
𝑎2 𝑏2 𝑐2
Solution:
𝐶2 −𝐶1
1 1 1 𝐶3 −𝐶1 1 1−1 1−1
det ( 𝑎 𝑏 𝑐) =
⏞ det ( 𝑎 𝑏−𝑎 𝑐−𝑎 )
𝑎2 𝑏2 𝑐2 𝑎2 𝑏 2 − 𝑎2 𝑐 2 − 𝑎2
1 0 0 𝑅1
𝑏−𝑎 𝑐−𝑎
= det ( 𝑎 𝑏−𝑎 𝑐−𝑎 )=⏞ 1 × [(−1)1+1 det ( 2 )]
𝑏 − 𝑎2 𝑐 2 − 𝑎2
𝑎2 𝑏 2 − 𝑎2 2
𝑐 −𝑎 2
𝑏−𝑎 𝑐−𝑎 1 1
= det ( ) = (𝑏 − 𝑎)(𝑐 − 𝑎) det ( )
(𝑏 − 𝑎)(𝑏 + 𝑎) (𝑐 − 𝑎)(𝑐 + 𝑎) 𝑎+𝑏 𝑐+𝑎
= (𝑏 − 𝑎)(𝑐 − 𝑎)[(1)(𝑐 + 𝑎) − (𝑎 + 𝑏)(1)]
= (𝑏 − 𝑎)(𝑐 − 𝑎)(𝑐 − 𝑏) = (𝑎 − 𝑏)(𝑏 − 𝑐)(𝑐 − 𝑎).
Page 57 of 114
Example 30
𝑎 1 1
Factorize det (1 𝑎 1).
1 1 𝑎
Solution
𝑎 1 1 𝑅1⟷𝑅3 1 1 𝑎
det (1 𝑎 1) =⏞ − det (1 𝑎 1)
1 1 𝑎 𝑎 1 1
𝑅2 −𝑅1
𝑅3 −𝑎𝑅1 1 1 𝑎 1 1 𝑎
=
⏞ − det ( 1 − 1 𝑎−1 1 − 𝑎 ) = − det (0 𝑎 − 1 −(𝑎 − 1))
𝑎 − 𝑎(1) 1 − 𝑎(1) 1 − 𝑎(𝑎) 0 1−𝑎 1 − 𝑎2
𝐶1
𝑎 − 1 −(𝑎 − 1) 1 −1
⏞ − 1 × (−1)1+1 det (
= ) = − (𝑎 − 1) det ( )
1−𝑎 1 − 𝑎2 1−𝑎 (1 − 𝑎)(1 + 𝑎)
1 −1
= −(𝑎 − 1)(1 − 𝑎) det ( ) = (𝑎 − 1)2 [(1)(1 + 𝑎) − (1)(−1)]
1 1+𝑎
= (𝑎 − 1)2 (𝑎 + 2).
Page 58 of 114
Example 31
𝑎 𝑏 𝑐
1
Show that det (𝑏 𝑐 𝑎 ) = − (𝑎 + 𝑏 + 𝑐)[(𝑎 − 𝑏)2 + (𝑏 − 𝑐)2 + (𝑐 − 𝑎)2 ].
2
𝑐 𝑎 𝑏
Solution
𝑎 𝑏 𝑐 𝑅1 +𝑅2 +𝑅3 𝑎+𝑏+𝑐 𝑎+𝑏+𝑐 𝑎+𝑏+𝑐
det (𝑏 𝑐 𝑎) =
⏞ det ( 𝑏 𝑐 𝑎 )
𝑐 𝑎 𝑏 𝑐 𝑎 𝑏
𝐶2 −𝐶1
1 1 1 𝐶3 −𝐶1 1 0 0
= (𝑎 + 𝑏 + 𝑐 ) det (𝑏 𝑐 ⏞ (𝑎 + 𝑏 + 𝑐 ) det (𝑏 𝑐 − 𝑏
𝑎) = 𝑎 − 𝑏)
𝑐 𝑎 𝑏 𝑐 𝑎−𝑐 𝑏−𝑐
𝑅1
𝑐−𝑏 𝑎−𝑏
⏞ (𝑎 + 𝑏 + 𝑐 ) [1 × det (
= )]
𝑎−𝑐 𝑏−𝑐
= −(𝑎 + 𝑏 + 𝑐)(𝑎2 + 𝑏2 + 𝑐 2 − 𝑎𝑏 − 𝑏𝑐 − 𝑐𝑎)
1
= − (𝑎 + 𝑏 + 𝑐)[(𝑎 − 𝑏)2 + (𝑏 − 𝑐 )2 + (𝑐 − 𝑎)2 ]
2
Page 59 of 114
Question
How do we determine whether a given system has no solution, a unique solution
or infinitely many solutions?
How do we obtain a solution of a given system efficiently?
𝑨 is called the coefficient matrix, 𝒙 is called an unknown vector and 𝒃 is called the
known vector.
Page 64 of 114
Example 35
The matrix representation of the system
2𝑥 + 5𝑦 = 3
{
𝑥− 𝑦=1
is given by
2 5 𝑥 3
( ) (𝑦) = ( ).
1 −1 1
The matrix representation of the system
𝑥 − 2𝑦 + 𝑧 = 0
{
3𝑥 −𝑧 =1
is given by
𝑥
1 −2 1 0
( ) (𝑦) = ( ).
3 0 −1 𝑧 1
Page 65 of 114
This matrix plays a crucial role in analyzing the solutions of a given system.
Page 66 of 114
Gaussian Elimination
Motivation
Suppose we would like to solve the following equations:
𝑥 + 𝑦 = 1 … … (1)
{
2𝑥 + 3𝑦 = 2 … … (2)
One can adopt the method of elimination by multiplying equation (1) by a factor of 2
and subtract from the equation (2):
𝑥+ 𝑦=1 𝑥+𝑦 =1
{ ⇒ { .
2𝑥 + 3𝑦 = 2 𝑦=0
One can obtain from last equation that 𝑦 = 0. Then one obtains 𝑥 = 1 using the
first equation.
Page 67 of 114
𝑎 ∗ ∗ ∗ ∗ ∗ ∗ ∗
0 𝑏 ∗ ∗ ∗ ∗ ∗ ∗
All entries below each pivot 0 0 0 𝑐 ∗ ∗ ∗ ∗
(the first non-zero entry of 0 0 0 0 0 𝑑 ∗ ∗
each row) are all zero.
(0 0 0 0 0 0 𝑒 ∗)
Remark:
The number of pivots is also called the rank of the matrix.
Page 71 of 114
The matrix is of reduced row echelon form if it is in row echelon form, the pivot is 1 in
each non-zero row and all entries above each pivot are all zero.
Remark:
The reduced row echelon form of a matrix is unique.
Page 72 of 114
(3) Addition of a scalar multiple of any (3) Addition of a scalar multiple of any
equation to another equation. row to another row.
2𝑥 − 𝑦 = 2 (2)+(1) 2𝑥 − 𝑦 = 2 2 −1 2 𝑅2 +𝑅1 2 −1 2
e. g. {
𝑥+𝑦=1
→ { . (
1 1
| ) →
1
(
3 0
| )
3
3𝑥 =3
.
Page 73 of 114
Example 36
Using Gaussian elimination, solve the following system of linear equations
𝑥 + 2𝑦 − 4𝑧 = −4
{ 5𝑥 − 3𝑦 − 7𝑧 = 6 .
3𝑥 − 2𝑦 + 3𝑧 = 11
Solution:
We first express the system in augmented form
1 2 −4 −4
(5 −3 −7 | 6 )
3 −2 3 11
𝑥 + 2𝑦 − 4𝑧 = −4 1 2 −4 −4
{ 5𝑥 − 3𝑦 − 7𝑧 = 6 (5 −3 −7 | 6 )
3𝑥 − 2𝑦 + 3𝑧 = 11 3 −2 3 11
𝑅2 −5𝑅1
(2)−5×(1)
𝑥 + 2𝑦 − 4𝑧 = −4 𝑅3 −3𝑅1
1 2 −4 −4
(3)−3×(1) → (0 −13 13 | 26 )
→ { −13𝑦 + 13𝑧 = 26
−8𝑦 + 15𝑧 = 23 0 −8 15 23
1 2 −4 −4
𝑥 + 2𝑦 − 4𝑧 = −4 𝑅2 / −13
(2)÷−13 → (0 1 −1 |−2)
→ { 𝑦 − 𝑧 = −2
0 −8 15 23
−8𝑦 + 15𝑧 = 23
𝑅3 +8𝑅2 1 2 −4 −4
(3)+8×(2) 𝑥 + 2𝑦 − 4𝑧 = −4 → (0 1 −1 |−2)
→ { 𝑦 − 𝑧 = −2 0 0 7 7
7𝑧 = 7
Example 37
4𝑦 − 𝑧 = 5
Solve {2𝑥 + 𝑦 + 3𝑧 = 13 using Gaussian Elimination.
𝑥 − 2𝑦 + 2𝑧 = 3
Solution
0 4 −1 5
We first express the system in augmented form: (2 1 3 |13)
1 −2 2 3
We perform the Gaussian Elimination as follows:
Standard Form Augmented Matrix Form
4𝑦 − 𝑧 = 5 0 4 −1 5
{2𝑥 + 𝑦 + 3𝑧 = 13 (2 1 3 |13)
𝑥 − 2𝑦 + 2𝑧 = 3 1 −2 2 3
𝑥 − 2𝑦 + 2𝑧 = 3 𝑅1 ↔𝑅3 1 −2 2 3
(1)↔(3)
→ {2𝑥 + 𝑦 + 3𝑧 = 13 → (2 1 3 |13)
4𝑦 − 𝑧 = 5 0 4 −1 5
Page 76 of 114
(2)−2×(1)
𝑥 − 2𝑦 + 2𝑧 = 3 𝑅2 −2𝑅1 1 −2 2 3
→ { 5𝑦 − 𝑧 = 7 → (0 5 −1 |7)
4𝑦 − 𝑧 = 5 0 4 −1 5
𝑥 − 2𝑦 + 2𝑧 = 3 1 −2 2 3
(2)÷5 1 7
𝑅2 /5 1 7
→ { 𝑦− 𝑧= → (0 1 − | )
5 5 5 5
4𝑦 − 𝑧 = 5 0 4 −1 5
1 −2 2 3
𝑥 − 2𝑦 + 2𝑧 = 3 1 7
1 7 𝑅3 −4𝑅2 0 1 −
(3)−4×(2) 𝑦− 𝑧= → 5 || 5
→ 5 5 1 3
1 3 0 0 − −
− 𝑧=− ( 5 5)
{ 5 5
In Example 38, there is a column with no pivot (column 2) in the echelon form.
1 1 −2 2
( | )
0 0 1 −3
We observe that the corresponding variable 𝑦 can take any values, 𝑦 is also called
“free variable”.
In general, if there is column which does not have any pivots, then the corresponding
unknown will be the free variable (if the system is consistent). Hence, the system has
infinite number of solutions.
As an example, if the echelon form of the system is
1 3 4 1 2 1 𝑥1 + 3𝑥2 + 4𝑥3 + 𝑥4 + 2𝑥5 = 1
(0 0 1 2 3 |2) or { 𝑥3 + 2𝑥4 + 3𝑥5 = 2.
0 0 0 0 3 3 3𝑥5 = 3
So 𝑥2 , 𝑥4 are the “free variables” and the general solution is given by
𝑥5 = 1, 𝑥4 = 𝑡, 𝑥3 = −1 − 2𝑡, 𝑥2 = 𝑠, 𝑥1 = 3 − 3𝑠 + 7𝑡.
Page 79 of 114
The corresponding variables in such columns (with no pivot) are “free variables”
(see Example 38).
The system has infinitely many solutions.
Case 2B: There are no columns with no pivot:
There is no free variables and the echelon form of augmented matrix is given
below
𝑎 ∗ ∗ ∗ ∗
0 𝑏 ∗ ∗ ∗
( | )
0 0 𝑐 ∗ ∗
0 0 0 𝑑 ∗
Every unknown is determined uniquely by solving backward.
The system has a unique solution.
Page 82 of 114
Example 40
Solve the following system
𝑥1 + 2𝑥2 − 3𝑥3 + 𝑥5 = 2
{ 2𝑥1 + 4𝑥2 + 𝑥4 − 2𝑥5 = 3 .
3𝑥1 + 6𝑥2 + 5𝑥3 + 𝑥4 − 𝑥5 = 1
Solution
1 2 −3 0 1 2
The corresponding augmented matrix is (2 4 0 1 −2 |3). Using Gaussian
3 6 5 1 −1 1
Elimination, we reduce the system into row echelon form:
1 2 −3 0 1 2 𝑅𝑅2−2𝑅
−3𝑅
1 1 2 −3 0 1 2
3 1
(2 4 0 1 −2 |3) → (0 0 6 1 −4 |−1)
3 6 5 1 −1 1 0 0 14 1 −4 −5
1 2 −3 0 1 2
1 2 −3 0 1 2 1 4 1
𝑅2 /6 1 4 1 𝑅 −14𝑅 0 0 1 − −
6 || 6 .
3 2
→ (0 0 1 − |− ) → 6
6 6 6 8 32 16
0 0 14 1 −4 −5 0 0 0 − −
( 6 6 6)
Page 84 of 114
Since there are columns (2nd column and 5th column) with no pivot, the system should
have infinitely many solutions.
The corresponding unknowns 𝑥2 and 𝑥5 will be free variables. We take 𝑥2 = 𝑠
and 𝑥5 = 𝑡, where 𝑠, 𝑡 are real numbers. The corresponding system is
𝑥1 + 2𝑥2 − 3𝑥3 + 𝑥5 = 2
1 4 1
𝑥3 + 𝑥4 − 𝑥5 = −
6 6 6.
8 32 16
{ − 𝑥4 + 𝑥5 = −
6 6 6
1 1
Solving the equations backwards, we obtain 𝑥4 = 2 + 4𝑡, 𝑥3 = − , 𝑥1 = − 2𝑠 − 𝑡
2 2
and the general solution vector becomes:
1
𝑥1 2 −2 −1
𝑥2 0 1 0
𝒙 = 𝑥3 = −
1 +𝑠 0 +𝑡 0 .
𝑥4 2 0 4
2
(𝑥5 ) (
⏟0 )
⏟( 0 ) (1)
general solution of the
particular
homogeneous system
solution
Page 85 of 114
1
2
0
Note that 𝒙𝒑 = − 1 is a particular solution of the nonhomogeneous system (𝑠 =
2
2
(0)
𝑡 = 0), so that 𝑨(𝒙 − 𝒙𝒑 ) = 𝒃 − 𝒃 = 𝟎 and 𝒙 − 𝒙𝒑 is the general solution of the
corresponding homogeneous system:
𝑥1 + 2𝑥2 − 3𝑥3 + 𝑥5 = 0
{ 2𝑥1 + 4𝑥2 + 𝑥4 − 2𝑥5 = 0 .
3𝑥1 + 6𝑥2 + 5𝑥3 + 𝑥4 − 𝑥5 = 0
−2 −1
1 0
Thus 0 and 0 are two linearly independent solutions of the above
0 4
(0) (1)
homogeneous system.
Page 86 of 114
Example 41
Find all values of 𝑐 for which the following system is consistent.
𝑥 + 2𝑦 − 𝑧 = 𝑐
{ −𝑥 + 4𝑦 + 𝑧 = 𝑐 2
𝑥 + 8𝑦 − 𝑧 = 𝑐 3
Solution:
1 2 −1 𝑐
To start with, we first transform the augmented matrix (−1 4 1 |𝑐 2 ) into
1 8 −1 𝑐 3
echelon form using Gaussian Elimination.
1 2 −1 𝑐 𝑅2+𝑅1 1 2 −1 𝑐
𝑅 3 −𝑅1
(−1 4 1 |𝑐 2 ) → (0 6 0 |𝑐 2 + 𝑐 )
1 8 −1 𝑐 3 0 6 0 𝑐3 − 𝑐
𝑅3 −𝑅2 1 2 −1
𝑐
→ (0 6 0 | 𝑐 2 + 𝑐 ).
0 0 0 𝑐 3 − 𝑐 2 − 2𝑐
Page 87 of 114
The system is consistent if there is no row with (0 0 0|𝑏), 𝑏 ≠ 0. This implies that
𝑐 3 − 𝑐 2 − 2𝑐 = 0 ⇔ 𝑐 (𝑐 2 − 𝑐 − 2) = 0 ⇔ 𝑐 (𝑐 − 2)(𝑐 + 1) = 0
⇒ 𝑐 = 0 or 𝑐 = 2 or 𝑐 = −1.
Remark: Since the column 3 has no pivot, the system has infinitely many solutions
(with 𝑧 as the free variable) if the system is consistent.
Example 42
We consider the following system of linear equations
𝑥 − 2𝑦 + 𝑧 = 1
{𝑥 − 𝑦 + 2𝑧 = 2.
𝑦 + 𝑐2𝑧 = 𝑐
Determine all values of 𝑐 for each of the following cases:
(a) The system has unique solution.
(b) The system has no solution.
(c) The system has infinitely many solutions.
Page 88 of 114
Solution:
1 −2 1 1
The corresponding augmented matrix is given by (1 −1 2 |2). We first
0 1 𝑐2 𝑐
reduce the system into row echelon form using Gaussian Elimination.
1 −2 1 1 𝑅2−𝑅1 1 −2 1 1 𝑅3−𝑅2 1 −2 1 1
(1 −1 2 |2) → (0 1 1 |1) → (0 1 1 | 1 )
0 1 𝑐2 𝑐 0 1 𝑐2 𝑐 0 0 𝑐2 − 1 𝑐 − 1
(a) The system has a unique solution only when there is no column with no pivot.
This implies 𝑐 2 − 1 ≠ 0 ⇒ 𝑐 ≠ ±1.
(b) The system has no solutions only when there is a row of the type (0 0 0|𝑏)
with 𝑏 ≠ 0. This implies 𝑐 2 − 1 = 0 and 𝑐 − 1 ≠ 0.
So we get 𝑐 = −1.
(c) Finally, the system has infinitely many solutions only when (i) there is a column
with no pivot and (ii) no row with (0 0 0|𝑏), 𝑏 ≠ 0. These imply 𝑐 2 − 1 = 0
and 𝑐 − 1 = 0. So we get 𝑐 = 1.
Page 89 of 114
Cramer’s Rule
This method provides an alternative to find the solution of a linear system when the
number of equations equal to number of unknowns.
We consider the system of linear equations with 𝑛 equations and 𝑛 unknowns,
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎 𝑥 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
{ 21 1 … (∗)
⋮
𝑎𝑛1 𝑥1 + 𝑎𝑛2 𝑥2 + ⋯ + 𝑎𝑛𝑛 𝑥𝑛 = 𝑏𝑛
In matrix form, we have 𝑨𝒙 = 𝒃.
The coefficient matrix 𝑨 is now a 𝑛 × 𝑛 square matrix.
If det 𝑨 ≠ 0, then 𝑨 is invertible (non-singular) and 𝑨−1 exists.
Then one can obtain the solution vector 𝒙 by multiplying both sides by 𝑨−1 , i.e.
𝑨−1 𝑨𝒙 = 𝑨−1 𝒃 ⇒ 𝒙 = 𝑨−𝟏 𝒃.
Using the formula of 𝑨−1 , we get
Page 90 of 114
Example 43
Solve the following system of linear equations by Cramer’s Rule
5𝑥 + 2𝑦 = 13
{ .
2𝑥 − 3𝑦 = 9
Solution:
5 2 13
Note that 𝑨 = ( ) and 𝒃 = ( ). Using Cramer’s rule, we have
2 −3 9
13 2
det ( ) 13 × (−3) − 9 × 2 −57
𝑥= 9 −3 = = = 3,
det 𝑨 5 × (−3) − 2 × 2 −19
5 13
det ( )
𝑦= 2 9 = 5 × 9 − 2 × 13 = 19 = −1.
det 𝑨 5 × (−3) − 2 × 2 −19
Page 93 of 114
1 0 0 4
(0 1 0 |−2) gives 𝑧1 = 4, 𝑧2 = −2, 𝑧3 = −1.
0 0 1 −1
So the inverse is given by
−2 −1 4
𝑿 = 𝑨−𝟏 =( 1 1 −2)
1 0 −1
which also equals the matrix on the R.H.S. of augmented matrix (∗∗).
Step 2: Use elementary row operations to transform the matrix into row echelon
form
1 ∗ ⋯ ∗ ∗ ∗ ∗ ∗
0 1 ⋯ ∗ ∗ ∗ ∗ ∗
( | ).
⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋱ ⋮
0 0 ⋯ 1 ∗ ∗ ∗ ∗
Step 3: Finally, we use elementary row operations to transform the augmented
matrix into the form which the matrix on the L.H.S. is an identity matrix 𝐼𝑛 .
Then the matrix on the R.H.S. will be the inverse 𝑨−𝟏 .
1 0 ⋯ 0 ∗ ∗ ∗ ∗
0 1 ⋯ 0 |∗ ∗ ∗ ∗
⋮ ⋮ ⋱ ⋮ |⋮ ⋮ ⋱ ⋮
⏟
0 0 ⋯ 1 ∗⏟ ∗ ∗ ∗
( 𝑰𝑛 𝑨−𝟏 )
This method is called Gauss Jordan Method.
Page 98 of 114
Example 44
Find the inverse of the matrix
3 2 6
𝑨 = (1 1 2).
2 2 5
Solution
We first write down the augmented matrix
3 2 6 1 0 0
(1 1 2 |0 1 0)
2 2 5 0 0 1
Using elementary row operations, we have
3 2 6 1 0 0 𝑅1↔𝑅2 1 1 2 0 1 0
(1 1 2 | 0 1 0) → (3 2 6 |1 0 0)
2 2 5 0 0 1 2 2 5 0 0 1
𝑅2 −3𝑅1
𝑅3 −2𝑅1
1 1 2 0 1 0
→ (0 −1 0 |1 −3 0)
0 0 1 0 −2 1
Page 99 of 114
−𝑅2 1 1 2 0 1 0
→ (0 1 0 |−1 3 0)
0 0 1 0 −2 1
𝑅1 −2𝑅3 1 1 0 0 5 −2
→ (0 1 0 |−1 3 0)
0 0 1 0 −2 1
𝑅1 −𝑅2 1 0 0 1 2 −2
→ (0 1 0 |−1 3 0 ).
0 0 1 0 −2 1
Since the L.H.S. becomes an identity matrix, therefore the inverse of 𝑨 is given by
1 2 −2
𝑨−𝟏 = (−1 3 0 ).
0 −2 1
Page 100 of 114
Example 45
Find the inverse of the matrix
1 −2 0 0
2 −3 3 1
𝐵=( )
0 1 2 −2
−1 1 1 3
Solution:
1 −2 0 0 1 0 0 0 𝑅2−2𝑅1 1 −2 0 0 1 0 0 0
2 −3 3 1 0 1 0 0 𝑅4+𝑅1 0 1 3 1 −2 1 0 0
( | )→ ( | )
0 1 2 −2 0 0 1 0 0 1 2 −2 0 0 1 0
−1 1 1 3 0 0 0 1 0 −1 1 3 1 0 0 1
𝑅3 −𝑅2 1 −2 0 0 1 0 0 0
𝑅4 +𝑅2 0 1 3 1 −2 1 0 0
→ ( | )
0 0 −1 −3 2 −1 1 0
0 0 4 4 −1 1 0 1
Page 101 of 114
1 −2 0 0 1 0 0 0
𝑅4 +4𝑅3 0 1 3 1 −2 1 0 0
→ ( | )
0 0 −1 −3 2 −1 1 0
0 0 0 −8 7 −3 4 1
−𝑅3 1 −2 0 0 1 0 0 0
𝑅4 /(−8) 0 1 3 1 −2 1 0 0
→ ( | )
0 0 1 3 −2 1 −1 0
0 0 0 1 −7/8 3/8 −1/2 −1/8
𝑅2 −𝑅4 1 −2 0 0 1 0 0 0
𝑅3 −3𝑅4 0 1 3 0 −9/8 5/8 1/2 1/8
→ ( | )
0 0 1 0 5/8 −1/8 1/2 3/8
0 0 0 1 −7/8 3/8 −1/2 −1/8
1 −2 0 0 1 0 0 0
𝑅2 −3𝑅3 0 1 0 0 −3 1 −1 −1
→ ( | )
0 0 1 0 5/8 −1/8 1/2 3/8
0 0 0 1 −7/8 3/8 −1/2 −1/8
Page 102 of 114
1 0 0 0 −5 2 −2 −2
𝑅1 +2𝑅2 0 1 0 0 −3 1 −1 −1
→ ( | ).
0 0 1 0 5/8 −1/8 1/2 3/8
0 0 0 1 −7/8 3/8 −1/2 −1/8
Thus the inverse of the matrix 𝐵 is found to be
−5 2 −2 −2
−3 1 −1 −1
𝐵−1 =( ).
5/8 −1/8 1/2 3/8
−7/8 3/8 −1/2 −1/8
Remark:
Comparing with the cofactor method that we used in previous section, Gauss-Jordan
method provides a simpler way in finding the inverse of matrices with larger size. If
one wishes to compute 𝐵−1 using cofactor method in the previous example, one
needs to compute 16 cofactors (determinant of 3 × 3 sub-matrices) in order to
obtain the answer!
Page 103 of 114
Example 47
Let 𝑎⃗ = 3𝑖⃗ + 2𝑗⃗, 𝑏⃗⃗ = 𝑖⃗ − 𝑘⃗⃗ and 𝑐⃗ = 2𝑖⃗ + 3𝑗⃗ + 4𝑘⃗⃗ be three vectors, determine
whether these three vectors are linearly independent.
Solution:
We need to solve the following equation for 𝑥1 , 𝑥2 , 𝑥3 .
𝑥1 𝑎⃗ + 𝑥2 𝑏⃗⃗ + 𝑥3 𝑐⃗ = ⃗0⃗
⇒ (3𝑥1 + 𝑥2 + 2𝑥3 )𝑖⃗ + (2𝑥1 + 3𝑥3 )𝑗⃗ + (−𝑥2 + 4𝑥3 )𝑘⃗⃗ = 0𝑖⃗ + 0𝑗⃗ + 0𝑘⃗⃗
Example 48
Determine if the vectors 𝑎⃗ = 𝑖⃗ + 5𝑗⃗ − 2𝑘⃗⃗, 𝑏⃗⃗ = 𝑖⃗ − 𝑘⃗⃗, 𝑐⃗ = −2𝑖⃗ + 10𝑗⃗ are linearly
independent.
Solution:
We consider the following equations:
𝑥1 𝑎⃗ + 𝑥2 𝑏⃗⃗ + 𝑥3 𝑐⃗ = ⃗0⃗
Since the equation 𝑥1 𝑎⃗ + 𝑥2 𝑏⃗⃗ + 𝑥3 𝑐⃗ = ⃗0⃗ has non-trivial solution (say when 𝑡 = 1,
we have 𝑥1 = −2, 𝑥2 = 4 and 𝑥3 = 1). Thus the vectors 𝑎⃗, ⃗⃗⃗ 𝑏 and 𝑐⃗ are linearly
dependent.
Page 109 of 114
Example 49
1 1 −3
2 1 0
Let 𝑎⃗ = ( ), 𝑏⃗⃗ = ( ), 𝑐⃗ = ( ) be three vectors in 4-D space. Determine if
0 1 1
−3 1 0
the vectors are linearly independent.
Solution
We consider the following equations:
1 1 −3 0
2 1 0 0
𝑥1 𝑎⃗ + 𝑥2 𝑏⃗⃗ + 𝑥3 𝑐⃗ = ⃗0⃗ ⇒ 𝑥1 ( ) + 𝑥2 ( ) + 𝑥3 ( ) = ( )
0 1 1 0
−3 1 0 0
𝑥1 + 𝑥2 − 3𝑥3 0 𝑥1 + 𝑥2 − 3𝑥3 = 0
2𝑥1 + 𝑥2 0 2𝑥1 + 𝑥2 =0
⇒( )=( )⇒{
𝑥2 + 𝑥3 0 𝑥2 + 𝑥3 = 0
−3𝑥1 + 𝑥2 0 −3𝑥1 + 𝑥2 =0
Page 110 of 114
Review Example 1
Solve the following system
2𝑥 + 𝑦 − 3𝑧 = 8
{ 5𝑥 + 3𝑦 + 𝑧 = 12 .
3𝑥 − 2𝑦 + 5𝑧 = −1
Solution: Using Gaussian Elimination, we have
2 1 −3 8 𝑅1/2 1 1/2 −3/2 4
(5 3 1 | 12 ) → (5 3 1 | 12 )
3 −2 5 −1 3 −2 5 −1
𝑅2 −5𝑅1 1 1/2 −3/2
𝑅3 −3𝑅1
4 𝑅3+7𝑅2 1 1/2 −3/2 4
→ (0 1/2 17/2 | −8 ) → (0 1/2 17/2 | −8 )
0 −7/2 19/2 −13 0 0 69 −69
1 17
Solving backward, we get 69𝑧 = −69 ⇒ 𝑧 = −1; 𝑦+ 𝑧 = −8 ⇒ 𝑦 = 1; 𝑥 +
2 2
1 3
𝑦 − 𝑧 = 4 ⇒ 𝑥 = 2.
2 2
Page 112 of 114
Review Example 2
Solve the system
𝑥− 𝑦− 𝑧+ 𝑤=1
{ 3𝑥 + 2𝑦 − 𝑤 = 0.
−𝑥 − 9𝑦 − 5𝑧 + 7𝑤 = 5
Solution:
Using the Gaussian Elimination method again, we get
1 −1 −1 1 1 𝑅𝑅2−3𝑅 1 1 −1 −1 1 1
3 +𝑅1
(3 2 0 −1| 0) → (0 5 3 −4| −3)
−1 −9 −5 7 5 0 −10 −6 8 6
𝑅3 +2𝑅2 1 −1 −1 1 1
→ (0 5 3 −4| −3).
0 0 0 0 0
Note that the 3rd column and 4th column have no pivots, the corresponding
variables 𝑧 and 𝑤 are free variables.
Page 113 of 114
To obtain the full solution, we write 𝑧 = 𝑠 and 𝑤 = 𝑡 where 𝑠, 𝑡 are two real
numbers. From the second equation (second row), we have
−3 − 3𝑧 + 4𝑤 −3 − 3𝑠 + 4𝑡
5𝑦 + 3𝑧 − 4𝑤 = −3 ⇒ 𝑦 = = .
5 5
From the first equation, we get
2 + 2𝑠 − 𝑡
𝑥−𝑦−𝑧+𝑤 =1⇒𝑥 =1+𝑦+𝑧−𝑤 = .
5
𝑥 2/5 2/5 −1/5
𝑦 −3/5 −3/5 4/5
The general solution vector: ( 𝑧 ) = ( )+𝑠 ( )+( ) 𝑡.
0 1 0
𝑤 ⏟ 0 ⏟ 0 1
particular two linearly independent
solution solutions of the corresponding
homogeneous system
Page 114 of 114
Review Example 3
1 −2 0
Using Gauss-Jordan Method to find the inverse of 𝐴 = (0 2 3).
4 2 3
Solution
1 −2 0 1 0 0 𝑅3 −4𝑅1 1 −2 0 1 0 0
(0 2 3 |0 1 0) → (0 2 3 | 0 1 0)
4 2 3 0 0 1 0 10 3 −4 0 1
𝑅3 −5𝑅2 1 −2 0 1 0 0 𝑅 𝑅/(−12)
2 /2
1 −2 0 1 0 0
3
→ (0 2 3 |0 1 0) → (0 1 3/2 | 0 1/2 0 )
0 0 −12 −4 −5 1 0 0 1 1/3 5/12 −1/12
3
𝑅2 − 𝑅3 1 −2 0 1 0 0 1 0 0 0 −1/4 1/4
𝑅1 +2𝑅2
→
2
(0 1 0 |−1/2 −1/8 1/8 ) → 0 1 0 ||−1/2 −1/8 1/8
0 0 1 1/3 5/12 −1/12 0 0 1 ⏟1/3 5/12 −1/12
( 𝐴−1 )