Feg 202 Module 2 Notes
Feg 202 Module 2 Notes
Module 2
Solutions of Linear System of
Equations.
Module Learning Outcomes
• State the properties of matrices.
• List and write mathematical representation of
eight (8) types of matrices.
• Solve problems involving the addition and
subtraction of matrices.
• Deduce the determinant of a matrix.
• Deduce the rank of a matrix.
Introduction
Consider the system of ′𝑛′ linear equations with ′𝑛′ unknowns
given by:
𝐴𝑋 = 𝐵
Introduction
where
𝑎11 𝑎12 ⋯ 𝑎1𝑛
𝑎21 𝑎22 … 𝑎2𝑛
𝐴= ⋮ ⋮ ⋮
𝑎𝑛1 𝑎𝑛2 … 𝑎𝑛𝑛
𝑥1
𝑥2
𝑋= ⋮
𝑥𝑛
𝑏1
𝑏2
𝐵=
⋮
𝑏𝑛
Introduction
• If 𝑏1 = 𝑏2 = ⋯ = 𝑏𝑛 = 0, which makes the
matrix 𝐵 = 0, then, the matrix equation of the
previous slide becomes 𝐴𝑋 = 0 , which is
known as the homogeneous equation.
• Again, if at least one of 𝑏1 = 𝑏2 = ⋯ = 𝑏𝑛 =
0, is non-zero, which makes 𝐵 ≠ 0, then, the
matrix of the previous slide becomes 𝐴𝑋 = 𝐵,
which is known as the non-homogeneous
linear equation.
∆1 ∆2 ∆𝑛
𝑥1 = , 𝑥2 = , … 𝑥𝑛 =
∆ ∆ ∆
1 3 6
−1 4 3 4 3 −1
∆= 3 −1 4 = −3 +6 = −58
−4 2 1 2 1 4
1 −4 2
2 3 6
−1 4 9 4 9 −1
∆1 = 9 −1 4 = −3 +6 = −116
−4 2 7 2 7 −4
1 −4 2
1 2 6
9 4 3 4 3 9
∆2 = 3 9 4 = −2 +6 = 58
7 2 1 2 1 7
1 7 2
1 3 2
−1 9 3 9 3 −1
∆3 = 3 −1 9 = −3 +6 = −29
−4 7 1 7 1 4
1 −4 7
∆1 −116 ∆2 58 ∆3 −29
𝑥1 = = = 2, 𝑥2 = = = −1, 𝑥3 = = = −0.5
∆ −58 ∆ −58 ∆ −58
Cramer’s Rule
Example 2:
Solve by Cramer’s rule method the following system of equations:
𝑥1 + 2𝑥2 − 2𝑥3 = 4
2𝑥1 + 𝑥2 + 𝑥3 = −2
−𝑥1 + 𝑥2 − 𝑥3 = 2
1 2 −2
1 1 2 1 2 1
∆= 2 1 1 = −2 −2 = −6
1 −1 −1 −1 −1 1
−1 1 −1
4 2 −2
1 1 −2 1 −2 1
∆1 = −2 1 1 =4 −2 −2 =0
1 −1 2 −1 2 1
2 2 −1
1 4 −2
−2 1 2 1 2 −2
∆2 = 2 −2 1 = −4 −2 =0
2 −1 −1 −1 −1 2
−1 2 −1
1 2 4
1 −2 2 −2 2 1
∆3 = 2 1 −2 = −2 +4 = 12
1 2 −1 2 −1 1
−1 1 2
∆1 0 ∆2 0 ∆3 12
𝑥1 = = = 0, 𝑥2 = = = −0, 𝑥3 = = = −2
∆ −6 ∆ −6 ∆ −6
Cramer’s Rule
Example 3:
Solve by Cramer’s rule method the following system of equations:
2𝑥1 + 3𝑥2 − 𝑥3 = −1
−𝑥1 − 2𝑥2 + 𝑥3 = 5
3𝑥1 − 𝑥2 = −2
2 3 1
−2 1 −1 1 −1 −2
∆= −1 −2 1 = 2 −3 − =4
−1 0 3 0 3 −1
3 −1 0
−1 3 −1
−2 1 5 1 5 −2
∆1 = 5 −2 1 =− −3 − =2
−1 0 −2 0 −2 −1
−2 −1 0
2 −1 −1
5 1 −1 1 −1 5
∆2 = −1 5 1 =2 + − = 14
−2 0 3 0 3 −2
3 −2 0
2 3 −1
−2 5 −1 5 −1 −2
∆3 = −1 −2 5 = −3 − = 50
−1 −2 3 −2 3 −1
3 −1 −2
∆1 2 1 ∆2 14 7 ∆3 50 25
𝑥1 = = = , 𝑥2 = = = , 𝑥3 = = =
∆ 4 2 ∆ 4 2 ∆ 4 2
Derivative of a Matrix
If a matrix ′𝐴′ with a single variable function, say ′𝑡′ have elements 𝑎𝑖𝑗 (𝑡)
that are differentiable, then the derivative of the matrix ′𝐴′ is given by:
𝑑𝐴 𝑑 𝑎𝑖𝑗
=
𝑑𝑡 𝑑𝑡
And its 𝑛𝑡ℎ order derivative with respect to ′𝑡′ is given by:
𝑑 𝑛 𝐴 𝑑 𝑑 𝑛−1 𝐴
𝑛
=
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑛−1
The derivative of the sum of two matrices 𝐴 𝑡 + 𝐵(𝑡) is given by:
𝑑 𝑑𝐴 𝑑𝐵
𝐴 𝑡 + 𝐵(𝑡) = +
𝑑𝑡 𝑑𝑡 𝑑𝑡
The derivative of the product of two matrices 𝐴 𝑡 𝐵(𝑡) is given by:
𝑑 𝑑𝐴 𝑑𝐵
𝐴 𝑡 𝐵(𝑡) = 𝐵+ 𝐴
𝑑𝑡 𝑑𝑡 𝑑𝑡
The derivative of an inverse matrix 𝐴(𝑡) , is given by:
𝑑𝐴−1 −1
𝑑𝐴 𝑑 −1
= −𝐴 = 𝐴
𝑑𝑡 𝑑𝑡 𝑑𝑡
Derivative of a Matrix
𝑑𝐴 𝑑2𝐴
Example 4: Find and 2 , given that
𝑑𝑡 𝑑𝑡
𝑡2 2𝑒 𝑡 2𝑡
𝐴 = 𝑠𝑖𝑛𝑡 2𝑡 + 1 𝑡
3𝑡 2 𝑐𝑜𝑠2𝑡 𝑒𝑡
Solution
𝑑𝐴 2𝑡 2𝑒 𝑡 2
= 𝑐𝑜𝑠𝑡 2 1
𝑑𝑡
6𝑡 −2𝑠𝑖𝑛2𝑡 𝑒𝑡
𝑑2𝐴 2 2𝑒 𝑡 0
= −𝑠𝑖𝑛𝑡 0 0
𝑑𝑡 2
6 −4𝑐𝑜𝑠2𝑡 𝑒 𝑡
Derivative of a Matrix
𝑑𝐴
Example 5: Find the determinant of at 𝑡 = 0, given that
𝑑𝑡
𝑒 𝑡 + 𝑡𝑒 𝑡 𝑐𝑜𝑠2𝑡 𝑠𝑖𝑛2𝑡
𝐴= 6𝑡 2𝑡 + 1 𝑐𝑜𝑠𝑡
𝑒2 2𝑠𝑖𝑛𝑡 𝑡
Solution
𝑑𝐴 𝑒 𝑡 + 𝑡𝑒 𝑡 −2𝑠𝑖𝑛2𝑡 𝑠𝑖𝑛2𝑡 2 0 2
ቤ = 6 2 −𝑠𝑖𝑛𝑡 = 6 2 0
𝑑𝑡 𝑡=0
𝑒𝑡 2𝑐𝑜𝑠𝑡 1 𝑡=0 1 2 1
𝑑𝐴 2 0 6 0 6 2
det ቤ =2 −0 +2
𝑑𝑡 𝑡=0 2 1 1 1 1 2
= 2 2 − 0 − 0 6 − 0 + 2 12 − 2 = 24
Derivative of a Matrix
Example 6: Given that
𝑐𝑜𝑠𝑡 𝑠𝑖𝑛𝑡
𝐴=
−𝑠𝑖𝑛𝑡 𝑐𝑜𝑠𝑡
𝑑𝐴−1 𝑑𝐴
Prove that = −𝐴−1 𝐴−1
𝑑𝑡 𝑑𝑡
Solution
The determinant for a 2 × 2 matrix is given by
𝐴 = 𝑐𝑜𝑠 2 𝑡 − (−𝑠𝑖𝑛2 𝑡) = 𝑐𝑜𝑠 2 𝑡 + 𝑠𝑖𝑛2 𝑡 = 1
𝑐𝑜𝑠𝑡 −𝑠𝑖𝑛𝑡
∴ 𝐴−1 =
𝑠𝑖𝑛𝑡 𝑐𝑜𝑠𝑡
(𝐸𝑞𝑛 2)
𝑑𝐴−1 −1
𝑑𝐴 −1
= −𝐴 𝐴
𝑑𝑡 𝑑𝑡
More Examples
Example 7: Find the inverse of the matrix
1 2 2
𝐴 = 1 −2 2
3 −1 5
The cofactor of element 1 on the first row is
−2 2
𝐴11 = (−1)1+1 = −8
−1 5
The cofactor of the first element 2 on the first row is
1 2
𝐴12 = (−1)1+2 =1
3 5
The cofactor of the second element 2 on the first row is
1 −2
𝐴13 = (−1)1+3 =5
3 −1
The cofactor of element 1 on the second row is
2 2
𝐴21 = (−1)2+1 = −12
−1 5
More Examples
The cofactor of element −2 on the second row is
1 2
𝐴22 = (−1)2+2 = −1
3 5
The cofactor of the first element 2 on the second row is
1 2
𝐴23 = (−1)2+3 =7
3 −1
The cofactor of the second element 3 on the third row is
2 2
𝐴31 = (−1)3+1 =8
−2 2
The cofactor of element −1 on the third row is
1 2
𝐴32 = (−1)3+2 =0
1 2
The cofactor of element 5 on the third row is
1 2
𝐴33 = (−1)3−3 = −4
1 −2
More Examples
Therefore the cofactor of A becomes:
−8 1 5
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑜𝑓 𝐴 = −12 −1 7
8 0 −4
−8 −12 8
𝐴𝑑𝑗 𝐴 = 1 −1 0
5 7 −4
−2 2 1 2 1 −2
𝐴 = −2 +2
−1 5 3 5 3 −1
= −10 + 2 − 2 5 − 6 + 2 −1 + 6 = −8 + 2 + 10 = 4
More Examples
Therefore the inverse of A becomes:
𝐴𝑑𝑗 𝐴 1 −8 −12 8
𝐴−1 = = 1 −1 0
𝐴 4
5 7 −4
More Examples
Example 8: Solve the system of equations below by matrix
inversion:
𝑥 + 2𝑦 + 2𝑧 = 1
𝑥 − 2𝑦 + 2𝑧 = −3
3𝑥 − 𝑦 + 5𝑧 = 7
𝐴𝑋 = 𝐵
1 2 2
𝐴= 1 −2 2
3 −1 5
𝑥
𝑋= 𝑦
𝑧
1
𝐵 = −3
7
More Examples
But,
𝑋 = 𝐴−1 𝐵
𝐴𝑑𝑗 𝐴 1 −8 −12 8
𝐴−1 = = 1 −1 0
𝐴 4
5 7 −4
(from example 7)
1 −8 −12 8 1
∴ 𝑋 = 𝐴−1 B = 1 −1 0 −3
4
5 7 −4 7
More Examples
1 −8 −12 8 1
∴ 𝑋 = 𝐴−1 B = 1 −1 0 −3
4
5 7 −4 7
1 84 21
𝑋= 4 = 1
4
−44 −11
∴ 𝑥 = 21, 𝑦 = 1, 𝑧 = −11