Module_2 Math
Module_2 Math
Linear Algebra
Elementary transformations associated with a matrix
𝑅4 → 𝑅4 − 𝑅3
𝝆(𝑨) = 𝟑
v. Find the values of k such that the matrix A may have rank equal to a) 3 b)2
1 1 1 1
𝐴 = [1 2 4 𝑘]
1 4 10 𝑘 2
Practice problems:
Find rank of the following matrices
4 0 2 1
i. 𝐴 = [2 1 3 4 ] (Ans:4)
2 3 4 7
2 3 1 4
0 1 2 −2
ii. 𝐴 = [4 0 2 6] (Ans:2)
2 1 3 1
2 1 −1 −1
iii. 𝐴 = [1 −1 −2 −4] (Ans: 3)
3 1 3 −2
6 3 0 −7
Solution of system of linear equations-Consistency:
Let
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
-----------------------------------------------------
-----------------------------------------------------
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + 𝑎𝑚3 𝑥3 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚 be the system of linear equations.
The above system of equations can be written in the matrix form AX=B
The system is said to be Homogeneous if 𝑏1 = 𝑏2 = 𝑏3 = ⋯ = 𝑏𝑛 = 0 otherwise said to be Non
homogeneous system of linear equations
Solution: It is the set of values of 𝑥1 , 𝑥2 , 𝑥3 , … 𝑥𝑛 that satisfy all the equations of the system
If 𝑥1 = 𝑥2 = 𝑥3 = … = 𝑥𝑛 = 0 is called trivial solution of the homogeneous system of equations
otherwise it is said to be non trivial solution.
Consistent: The system of linear equations has solution
Inconsistent: The system of linear equations has no solution. Here (n-r) unknowns can be taken
arbitrarily.
To determine whether the system is consistent or inconsistent, consider augmented matrix [𝐴: 𝑩] and
find its rank.
Unique solution: if 𝜌([𝐴: 𝐵] ) = 𝜌(𝐴) = 𝑟 = 𝑛
Infinite number of solutions: 𝜌([𝐴: 𝐵] ) = 𝜌(𝐴) = 𝑟 < 𝑛
No solution: 𝜌([𝐴: 𝐵] ) ≠ 𝜌(𝐴)
Test the following system of equations for consistency
i. 𝑥 + 𝑦 + 𝑧 = −3
3𝑥 + 𝑦 − 2𝑧 = −2
3𝑥 + 4𝑦 + 7𝑧 = 7
Solution:
1 1 1 : −3
[𝐴: 𝑩] = [3 1 −2 : −2]
3 4 7 : 7
𝑅2 → 𝑅2 − 3𝑅1 , 𝑅3 → 𝑅3 − 3𝑅1
1 1 1 : −3
[𝐴: 𝑩] = [0 −2 −5 : 7]
0 1 4 : 16
𝑅3 → 𝑅3 + 𝑅2
1 1 1 : −3
[𝐴: 𝑩] = [0 −2 −5 : 7]
0 0 3 : 39
𝜌([𝐴: 𝐵] ) = 𝜌(𝐴) = 3
Hence the given system of equations is consistent and has unique solution.
ii. 𝑥+𝑦+𝑧 =6
𝑥 − 𝑦 + 2𝑧 = 5
3𝑥 + 𝑦 + 𝑧 = 8
Solution:
1 1 1 : 6
[𝐴: 𝑩] = [1 −1 2 : 5]
3 1 1 : 8
𝑅2 → 𝑅2 − 𝑅1 , 𝑅3 → 𝑅3 − 3𝑅1
1 1 1 : 6
~ [0 −2 1 : −1 ]
0 −2 −2 : −10
𝑅3 → 𝑅3 − 𝑅2
1 1 1 : 6
~ [0 −2 1 : −1 ]
0 0 −3 : −9
𝜌([𝐴: 𝐵] ) = 𝜌(𝐴) = 3 = 𝑛
Hence the given system of equations is consistent and has unique solution.
𝑥+𝑦+𝑧 =6
−2𝑦 + 𝑧 = −1
−3𝑧 = −9
Hence the unique solution is 𝑥 = 1, 𝑦 = 2, 𝑧 = 3
iii. 5𝑥 + 3𝑦 + 7𝑧 = 4
3𝑥 + 26𝑦 + 2𝑧 = 9
7𝑥 + 2𝑦 + 10𝑧 = 5
Solution:
5 3 7 : 4
[𝐴: 𝑩] = [3 26 2 : 9 ]
7 2 10 : 5
𝑅2 → 5𝑅2 − 3𝑅1 , 𝑅3 → 5𝑅3 − 7𝑅1
5 3 7 : 4
~ [0 121 −11 : 33]
0 −11 1 : −3
𝑅3 → 11𝑅3 + 𝑅2
5 3 7 : 4
~ [0 11 −1 : 3]
0 −11 1 : −3
𝑅3 → 𝑅3 + 𝑅2
5 3 7 : 4
~ [0 11 −1 : 3]
0 0 0 : 0
𝜌([𝐴: 𝐵] ) = 𝜌(𝐴) = 2 < 𝑛
Hence the given system of equations is consistent and has infinite number of solutions.
5𝑥 + 3𝑦 + 7𝑧 = 4
11𝑦 − 𝑧 = 3
𝑘+3 7−16𝑘
Let 𝑧 = 𝑘 𝑦 = 11
𝑥= 11
𝑥+𝑦+𝑧 =9
−3𝑦 + 2𝑧 = −1
11𝑧 = 44
Hence the solution is 𝑥 = 2, 𝑦 = 3, 𝑧=4
v. 𝑥1 + 𝑥2 + 𝑥3 + 4𝑥4 = −6
𝑥1 + 7𝑥2 + 𝑥3 + 𝑥4 = 12
𝑥1 + 𝑥2 + 6𝑥3 + 𝑥4 = −5
5𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 =4
Solution:
1 1 1 4 : −6
[𝐴 ∶ 𝐵] = [1 7 1 1 : 12
]
1 1 6 1 : −5
5 1 1 1 : 4
1 1 1 4 : −6
0 6 0 −3 : 18
~[ ]
0 0 5 −3 : 1
0 −4 −4 −19 : 34
1 1 1 4 : −6
0 2 0 −1 : 6
~[ ]
0 0 5 −3 : 1
0 −4 −4 −19 : 34
1 1 1 4 : −6
0 2 0 −1 : 6
~[ ]
0 0 5 −3 : 1
0 0 −4 −21 : 46
1 1 1 4 : −6
0 2 0 −1 : 6 ]
~[
0 0 5 −3 : 1
0 0 0 −117 : 234
𝑥1 + 𝑥2 + 𝑥3 + 4𝑥4 = −6
2𝑥2 − 𝑥4 = 6
5𝑥3 − 3𝑥4 = 1
−117𝑥4 = 234
Hence the solution is 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = −1, 𝑥4 = −2
vi. 2𝑥1 − 𝑥2 + 3𝑥3 = 1
−3𝑥1 + 4𝑥2 − 5𝑥3 = 0
9 23 13
𝑥1 + 3𝑥2 − 6𝑥3 = 0 (Ans: 𝑥1 = , 𝑥2 = , 𝑥3 = )
34 34 34
vii.
3𝑥 + 3𝑦 + 2𝑧 = 1
𝑥 + 2𝑦 = 4
10𝑦 + 3𝑧 = −2
2𝑥 − 3𝑦 − 𝑧 = 5 (Ans: x=2, y=1, z=-4)
2 0 0 1 1⁄2 2
𝐿 = [4 9 0 ] 𝑈 = [0 1 −1]
8 −7 −21 0 0 1
𝐿𝑌 = 𝐵
2 0 0 𝑦1 12
[4 9 0 ] [𝑦 2 ] = [ 33] 𝑦1 = 6, 𝑦2 = 1, 𝑦3 = 1
8 −7 −21 3 𝑦 20
𝑈𝑋 = 𝑌
1 1⁄ 𝑥 6
2 2
[0 1 −1 ] [𝑦 ] = [1] 𝑥 = 3, 𝑦 = 2, 𝑧=1
0 0 1 𝑧 1
ii. 4𝑥1 + 𝑥2 + 𝑥3 = 4
𝑥1 + 4𝑥2 − 2𝑥3 = 4
3𝑥1 + 2𝑥2 − 4𝑥3 = 6
Solution:
4 1 1 𝑥1 4
𝐴 = [1 4 −2] 𝑥
𝑋 = [ 2] 𝐵 = [ 4]
3 2 −4 𝑥3 6
𝐿𝑈 = 𝐴
𝑙11 0 0 1 𝑢12 𝑢13 4 1 1
[𝑙21 𝑙22 0 ] [0 1 𝑢23 ] = [ 1 4 −2]
𝑙31 𝑙32 𝑙33 0 0 1 3 2 −4
4 0 0 1 1⁄ 1⁄
15 4 4
𝐿 = [1 ⁄4 0 ] 𝑈 = [0 1 − ⁄5]
3
3 5⁄4 −4 0 0 1
𝐿𝑌 = 𝐵
4 0 0 𝑦
15 1 4 4
[ 1 ⁄4 0 ] [ 2 ] [4] 𝑦1 = 1, 𝑦2 = , 𝑦3 = −1/2
𝑦 =
5
3 5⁄4 −4 𝑦3 6
𝑈𝑋 = 𝑌
1 1⁄4 1⁄4 𝑥1 1 1
[0 1 − 3⁄ ] [𝑥2 ] = [ 4/5 ] 𝑥1 = 1, 𝑥2 = , 𝑥3 = −1/2
5 𝑥3 −1/2 2
0 0 1
iii. 𝑥1 + 5𝑥2 + 𝑥3 = 14
2𝑥1 + 𝑥2 + 3𝑥3 = 13
3𝑥1 + 𝑥2 + 4𝑥3 = 17 (Ans: 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 3 )
Practice problems:
Use LU decomposition method (Crout’s method) to solve the following system of equations
i. 2𝑥 + 5𝑦 + 7𝑧 = 52
2𝑥 + 𝑦 − 𝑧 = 0
𝑥+𝑦+𝑧 =9 (Ans: x=1, y=3, z=5)
ii. 2𝑥 + 3𝑦 − 𝑧 = 5
4𝑥 + 4𝑦 − 3𝑧 = 3
2𝑥 − 3𝑦 + 2𝑧 = 2 (Ans:x=1, y=2, z=3)
Eigen values and eigen vectors: Given a square matrix A, if there exists a scalar and a non
zero column matrix X such that AX=X then is called eigen value and X is called the eigen
vector corresponding of
Here |𝐴 − 𝜆𝐼| = 0 is called characteristic equation of A. The roots of this equation are the
eigen values. For each eigen value there exist a corresponding eigen vector 𝑋 ≠ 0.
Rayleigh power method to find the dominant(largest) eigen value and the corresponding
eigen vector:
This is an iterative method to find the largest eigen value and the corresponding eigen vector.
In this method, the resultant matrix is normalized(take out numerically largest element)in each
step. The process is continued till two consecutive values are approximately same.
1 1 0 0
Note: The eigen vector can be initialized with [1] 𝑜𝑟 [0] 𝑜𝑟 [1] 𝑜𝑟 [0]
1 0 0 1
1. Find the largest eigen value and the corresponding eigen vector of the matrix A, by
using Rayleigh power method, by taking the initial vector as [1, 1, 1]𝑇 where
2 −1 0
𝐴 = [−1 2 −1]
0 −1 2
Solution:
𝐴=
2 −1 0 1 1
(0) (1) (1)
𝐴𝑋 = [−1 2 −1] [1] = 1 [0] = 𝝀1 𝑋1
0 −1 2 1 1
2 −1 0 1 1
(2) (2)
𝐴𝑋 (1) = [−1 2 ]
−1 0[ ] = 2 [ −1] = 𝝀1 𝑋1
0 −1 2 1 1
2 −1 0 1 0.75
(3) (3)
𝐴𝑋 (2) = [−1 2 −1] [−1] = 4 [ −1 ] = 𝝀1 𝑋1
0 −1 2 1 0.75
2 −1 0 0.75 0.71
(4) (4)
𝐴𝑋 (3) = [−1 2 −1] [ −1 ] = 3.5 [ −1 ] = 𝝀1 𝑋1
0 −1 2 0.75 0.71
2 −1 0 0.71 0.708
(5) (5)
𝐴𝑋 (4) = [−1 ] [
2 −1 −1 ] = 3.42 [ −1 ] = 𝝀1 𝑋1
0 −1 2 0.71 0.708
2 −1 0 0.708 0.7073
(6) (6)
𝐴𝑋 (5) = [−1 2 −1] [ −1 ] = 3.416 [ −1 ] = 𝝀1 𝑋1
0 −1 2 0.708 0.7073
2 −1 0 0.7073 0.7071
(7) (7)
𝐴𝑋 (6) = [−1 2 −1] [ −1 ] = 3.4146 [ −1 ] = 𝝀1 𝑋1
0 −1 2 0.7073 0.7071
𝟎. 𝟕𝟎𝟕𝟏
Hence the largest eigen value is 𝟑. 𝟒𝟏𝟒𝟔 and the corresponding eigen vector is [ −𝟏 ]
𝟎. 𝟕𝟎𝟕𝟏
Practice problems:
Find the largest eigen value and the corresponding eigen vector of the following matrices, by
using Rayleigh power method
1 2 0.46
i. 𝐴=[ ] (Ans: 5.38 & [ ])
3 4 1
4 1 −1 𝟏
ii. 𝐴=[ 2 3 −1] (Ans: 6 & [ 𝟏 ])
−2 1 5 −𝟏
Diagonalisation:If A is a square matrix of order n having n linearly independent eigen vectors then
there exists an nth order square matrix P such that 𝑃−1 𝐴𝑃 is a diagonal matrix.
If A is asquare matrix of order 2, then it will have 2 eigen values 𝜆1 & 𝜆2 and the corresponding eigen
vectors are 𝑋1 & 𝑋2.
Then the modal matrix 𝑃 = [𝑋1 𝑋2 ]
𝜆1 𝑛 0
Note: 𝐴𝑛 = 𝑃𝐷 𝑛 𝑃−1 where 𝐷 𝑛 = [ ]
0 𝜆2 𝑛
−1 3
1. Reduce the matrix 𝐴 = [ ] to the diagonal form
−2 4
Solution:
|−𝟏 − 𝝀 𝟑 |=𝟎
−𝟐 𝟒−𝝀
𝜆2 − 3𝜆 + 2 = 0 𝜆 = 1, 2 are the eigen values
i. For 𝝀 = 𝟏
[𝐴 − 𝜆𝐼][𝑋] = [0]
𝑥 𝑦
2𝑥 − 3𝑦 = 0 =
3 2
3
𝑋=[ ]
2
ii. For 𝜆 = 2
𝑥 𝑦
3𝑥 − 3𝑦 = 0 =
1 1
1
𝑋=[ ]
1
3 1
∴ 𝑃=[ ]
2 1
1 −1
𝑃−1 = [ ]
−2 1
1 0
∴ 𝑃−1 𝐴𝑃 = 𝐷 = [ ]
0 2
−1 2
2. Reduce the matrix 𝐴 = [ ] to the diagonal form hence find 𝑨𝟔
2 −1
Solution:
|−1 − 𝜆 2 |=0
2 −1 − 𝜆
𝜆2 + 2𝜆 − 3 = 0 𝜆 = 1, −3 are the eigen values
i. For 𝜆 = 1
[𝐴 − 𝜆𝐼][𝑋] = [0]
𝑥 𝑦
𝑥 − 𝑦 = 0 =
1 1
1
𝑋=[ ]
1
ii. For 𝜆 = −3
𝑥 𝑦
𝑥 + 𝑦 = 0 =
1 −1
1
𝑋=[ ]
−1
1 1
∴ 𝑃=[ ]
1 −1
1 1
1
𝑃−1 = 2 [ ]
1 −1
1 0
∴ 𝑃−1 𝐴𝑃 = 𝐷 = [ ]
0 −3
365 −364
∴ 𝐴6 = [ ]
−364 365
Practice problems:
−1 3
i. Reduce the matrix 𝐴 = [ ] to the diagonal form hence find 𝐴4
−2 4
−19 7
ii. Reduce the matrix 𝐴 = [ ] to the diagonal form
−42 16
11 −4 −7
iii. Reduce the matrix 𝐴 = [ 7 −2 −5] to the diagonal form hence find 𝐴5
10 −4 −6