2.5 Rank of A Matrix and Solving System of Equations
2.5 Rank of A Matrix and Solving System of Equations
Problem: Find the rank of the following matrix using elementary row
transformations.
1 2 −1 0
− 1 3 0 − 4
A= .
2 1 3 − 2
1 1 1 − 1
1 2 − 1 0
0 5 − 1 − 4
A
0 − 3 5 − 2
0 − 1 2 − 1
Perform, R2 R4, R2 → - R2
1 2 − 1 0
0 1 − 2 1
A
0 − 3 5 − 2
0 5 − 1 − 4
Perform, R4 → R4-9R3
1 2 −1 0
0 1 − 2 1
A
0 0 1 − 1
0 0 0 0
The above matrix is an echelon form of a matrix and the number of non zero rows in it
is 3. Therefore the rank (A) = 3.
9 9 9
1 2 3
Example: Find the rank of the matrix A =
2 4 6
7 7 7
R1 R R
Solution: Perform, R1 → , R3 → 3 , R4 → 4
9 2 7
1 1 1
1 2 3
A
1 2 3
1 1 1
1 1 1
0 1 2
A
0 0 0
0 0 0
The above matrix is in echelon form and the number of nonzero rows in it is 2 and so
the rank (A) = 2.
Example: Find the rank of the matrix by using elementary row transformations.
2 − 2 5 3
4 − 1 1 1
3 − 2 3 4
1 − 3 7 6
Solution: Perform, R1 R4
1 − 3 7 6
4 − 1 1 1
3 − 2 3 4
2 − 2 5 3
1 − 3 7 6
0 11 − 27 − 23
0 7 − 18 − 14
0 4 −9 −9
Perform, R4 → (R4+R3) – R2
1 − 3 7 6
0 11 − 27 − 23
0 7 − 18 − 14
0 0 0 0
R2 R
Perform, R2→ , R3 → 3
11 11
1 − 3 7 6
0 1 − 27 − 23
11 11
0 1 − 18 −2
7
0 0 0 0
Perform, R3 → R3-R2
1 − 3 7 6
0 1 − 27 − 23
11 11
0 0 9 1
77 11
0 0 0 0
77
Perform, R3 → R3
9
1 − 3 7 6
0 1 − 27 − 23
11 11
0 0 1 7
9
0 0 0 0
Linear Equations-Consistency:
... … ...
The aij are given numbers, which are called the coefficients of the system. The bi are
also given numbers.
If the bi are all zero, then (*) is called a homogeneous system. If at least one bi is not
zero, then (*) is called a non-homogeneous system.
A solution of (*) is a set of numbers x1, x2, .., xn which satisfy all the m equations. If
the system (*) is homogeneous, it has at least one trivial solution x1 = 0, x2 = 0… xn =
0.
From the definition of matrix multiplication, we can write the above system (*) as
AX = B
x1 b1
x b
X = 2 and B = 2
n 1 m 1
xn b m
is called the augmented matrix. The matrix A B determines the system (*)
Note: The matrix equation AX = B need not always have a solution. It may have no
solution or a unique solution or an infinite number of solutions.
ii) if rank A = rank A B = number of unknowns, then system has a unique
solution.
iii) if rank A = rank A B < number of unknowns, then system has an infinite
number of solutions.
x+y+z=6
x – y + 2z = 5
3x + y + z = 8
1 1 1 : 6
Solution: The augmented matrix A B = 1 −1 2 : 5
3 1 1 : 8
1 1 1 : 6
A : B = 0 −2 1 : −1
0 −2 −2 : −10
Perform R 3 → -R 2 + R 3
1 1 1 : 6
A : B = 0 −2 1 : −1
0 0 −3 : −9
Now both A and A B have all the three rows non zero. Therefore the rank (A) = 3
= rank A B = the number of independent variables. Therefore the given system of
– 2y + z = -1………..(ii)
-3z = -9 ………..(iii)
1 2 1
2 1 0
4. Find the rank of the following matrix A =
3 3 1
4 5 2
Answer: Rank of A is 2.
a1 x + b1y + c1z = d1
a2
We eliminate x from the second equation by subtracting times the first equation
a1
from the second equation. Similarly we eliminate x from the third equation by
a3
eliminating times the first equation from the third equation. We thus, get the
a1
new system
a1 x + b 1 y + c 1 z = d1
Here the first equation is called the pivotal equation and a1 is called the first pivot
element.
b '3
We eliminate y from the third equation of (ii) by subtracting times the second
b '2
equation from the third equation. We thus, get the new system
a1 x + b1 y + c1z = d1
c'' 3 z = d ' 3
Here the second equation is the pivotal equation and b'2 is the new pivot element.
The values of x, y, z are found from the reduced system (iii) by back substitution.
This also can be derived from the augmented matrix of the system (i),
a1 b1 c1 d1
[A|B] = a b2 c2 d 2 …………………(iv)
2
a 3 b3 c3 d1
a1 b1 c1 d1
That is., [A|B] ~ 0 b '2 c'2 d'2 ………………..(v)
0 0 c'' 3 d ' 3
a1 x + b1 y + c1z = d1
c3 ''z = d3 ''
By back substitution we get z, y and x constituting the exact solution of the system (i).
Note: The method will fail if one of the pivot elements a1, b '2 or c3 '' vanishes. In
such cases the method can be modified by rearranging the rows so that the pivots are
non-zero. If this is impossible, then the matrix is singular and the equations have no
solution.
2x + y + 4z = 12
4x + 11y – z = 33
8x – 3y + 2z = 20
2 1 4 12 R1
[A|B] = 4 11 −1 33 R 2
8 −3 2 20 R 3
Perform R2 → R2 – 2R1 and R3 → R3 – 4R1
2 1 4 12
[A|B] = 0 9 −9 9
0 −7 −14 −28
1 7
Perform R 2 → R 2 and R 3 → R 3 + R 2
9 9
2 1 4 12
[A|B] = 0 1 −1 1
0 0 3 3
Now we have
2x + 1y + 4z = 12
1y – 1z = 1
3z = 3
Therefore z = 1
5x + y + z + w = 4
x + 7y + z + w = 12
x + y + 6z + w = –5
x + y + z + 4w = –6
1 1 1 4 − 6
0 6 0 −3 18
A B =
0 0 5 −3 1
0 −4 −4 −19 34
2
Perform: R4 → R4 + R2
3
1 1 1 4 −6
0 6 0 −3 18
A B =
0 0 5 −3 1
0 0 −4 −21 46
4
Perform: R4 → R4 + R3
5
1 1 1 4 −6
0 6 0 −3 18
0 0 5 −3 1
A B =
117 234
0 0 0 −
5 5
Perform R4 → 5R4
1 1 1 4 −6
0 6 0 −3 18
A B =
0 0 5 −3 1
0 0 0 − 117 234
Now we have
1x + 1y + 1z + 4w = –6
6y + 0z – 3w = 18
5z – 3w = 1
–117w = 234
Therefore w = –2.
y– z + 2 = 0
x + y – 2z = 0
Answer: Rank (A) = Rank (A:B) = 2 < the number of unknowns = 3. Therefore the
system is consistent, and have infinite number of solutions, which involve n – r = 3 –
2 = 1 constant (s).
be a nonsingular square matrix. Then A can be factorized into the form LU, where
1 0 0 ... 0 u11 u12 ... u1n
l 1 0 ... 0 0 u 22 ... u 2n
L = 21 and U = ,
... ... ... ... ... ... ... ... ...
ln1 ln2 ... ... 1 0 0 ... u nn
if
a11 a12 a13
a11 a12
a11 0, 0, a 21 a 22 a 23 0, and so on
a 21 a 22
a 31 a 32 a 33
Solution: Let
2 3 1 1 0 0 u11 u12 u13
1 2 3 = l 0 0 u22 u23
21 1
3 1 2 l31 l32 1 0 0 u33
It follows that
1 0 0 2 3 1
L = 1/ 2 1 0 and U = 0 1/2 5/2
3/ 2 −7 1 0 0 18
LU Decomposition Method
Consider the system given by
a11 x1 + a12 x2 + a13 x3 + ... + a1n xn = b1
a21 x1 + a22 x2 + a23 x3 + ... + a2 n xn = b2
a31 x1 + a32 x2 + a33 x3 + ... + a3n xn = b1
………………(1)
.
.
a n1x 2 +a n2 x 2 +a n3 x 3 +...+a nn x n = b n
where
y1 b1
Y = y2 , B = b2 .
y b
n n
The system (5) can be solved for y1, y2,…,yn by forward substitution. When Y is known, the
system (3) becomes
u11 x1 + u12 x2 + + u1n xn = y1
u22 x2 + + u2 n xn = y2
……………(6)
unn xn = yn
which can be solved for x1, x2,…, xn by back substitution process. This method has the
advantage of being applicable to solve systems with the same coefficient matrix but different
right – hand vectors.
Example 2:
Solve the system of equations
2x + 3y + z = 9
X + 2y + 3z = 6
3x + y + 2z = 8
by the method of LU decomposition.
Solution:
We have
2 3 1 9
A = 1 2 3 and B = 6 .
3 1 2 8
Tridiagonal Systems:
b1u1 + c1u2 = d1
a2u1 + b2u2 + c2u3 = d 2
a3u2 + b3u3 + c3u4 = d3 (1)
anun−1 + bnun = d n
Matrices of the type, given in equation (2), called the tridiagonal matrices, occur
frequently in the solution of ordinary and partial differential equations by finite
difference methods.
Step I:
Set 1 = b1
ai ci −1
Compute i = bi − , i = 2,3,..., n
i −1
Step II:
d1
Set 1 =
1
di − ai i −1
Compute i = , i = 2,3,..., n
i
Step III:
Example 1:
2x – y = 0
−x + 2y – z = 0
−y + 2z –u = 0
−z +2u = 1
Solution:
b1 = b2 = b3 = b4 = 2
a2 = a3 = a4 = −1
c1 = c2 = c3 = −1
d1 = d 2 = d3 = 0, d 4 = 1
3 4 5
1 = 2, 2 = , 3 = , 4 = .
2 3 4
4
1 = 0, 2 = 0, 3 = 0, 4 = .
5
4 3 2 1
u= , z= , y= , x= .
5 5 5 5
Exercise
2x + y = 0
3x + y + z = 1
2y + z + t = 0
3z – t = 2
2x + y =1
x + 2y + z = 3
y + 2z + u = 3
z + 2u =1