0% found this document useful (0 votes)
34 views17 pages

2.5 Rank of A Matrix and Solving System of Equations

The document discusses the concept of the rank of a matrix and its application in solving systems of linear equations. It explains that a linear system has a solution if the rank of the coefficient matrix equals the rank of the augmented matrix. Several examples illustrate how to find the rank using elementary row transformations and the conditions for consistency in linear equations.

Uploaded by

khushpatel1222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views17 pages

2.5 Rank of A Matrix and Solving System of Equations

The document discusses the concept of the rank of a matrix and its application in solving systems of linear equations. It explains that a linear system has a solution if the rank of the coefficient matrix equals the rank of the augmented matrix. Several examples illustrate how to find the rank using elementary row transformations and the conditions for consistency in linear equations.

Uploaded by

khushpatel1222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

2.

5 Rank of a matrix and solving system of equations

The rank of a matrix A is the maximum number of linearly independent row


vectors (or column vectors) in A. A simple application of rank comes from the
fact that a linear system of equations AX=B has a solution if and only if the rank
of the coefficient matrix A is the same as the rank of the matrix [A|B] where [A|B]
denotes the coefficient matrix augmented by column vector B.

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

Solution: Clearly, rank (A) ≤ min {4, 4} = 4.

Apply row transformations,

Perform, R2 → R2 + R1, R3 → R3-2R1, R4 → R4-R1

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, R3 → R3 + 3R2, R4 → R4 – 5R2, R3 → -R3


1 2 −1 0 
0 1 − 2 1 
A 
0 0 1 − 1
 
0 0 9 − 9

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

Perform, R3 → R3-R2, R4 → R4-R1, R2 → R2-R1.

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

Perform, R2 → R2-4R1, R3 → R3-3R1, R4 → R4-2R1.

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 

The above form is an echelon form and hence the rank is = 3.

Linear Equations-Consistency:

Definitions: A system of m linear equations in n unknowns x1, x2, …, xn is a set of


equations of the form

a11 x1 + a12 x2 + … + a1n xn = b1

a21 x1 + a22 x2 + … + a2n xn = b2

… ... ... _______ (*) say.

... … ...

am1 x1 + am2 x2 + ... + amn xn = bm.

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

a11 a12 .... a1n 


a 
 21 a 22 .... a 2n 
where A = .... .... .... ....  is the coefficient matrix
 
.... .... .... .... 
a m1 a m2 .... a mn 
  mn

 x1   b1 
x  b 
X =  2 and B =  2 
   
  n 1   m 1
xn   b m 

Note that X has n elements where as B has m elements.

 a11 a12 ..... a1 n b1 


 
 a 21 a 22 ..... a 2 n b2 
The matrix  A B or [A:B] =  .... .... .... .... .... 
 
 .... .... .... .... .... 
 
a m1 a m2 .... a mn bm 

is called the augmented matrix. The matrix  A B determines the system (*)

completely, since it contains all the given numbers appearing in (*).

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.

Definition: A system of equations having no solution is called an inconsistent system.


A system of equations having one or more solution is called a consistent system.

Observations: Consider a system of non-homogeneous linear equations AX = B.


i) if rank A  rank  A B , then system is inconsistent.

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.

Example: Test for consistency and solve

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 

Perform R 2 → - R1 + R 2 and R 3 → -3R1 + R 3

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

equations is consistent and will have unique solution.


Now convert the prevailing form of [A:B] to a set of equations we get
x + y + z = 6 ……….(i)

– 2y + z = -1………..(ii)

-3z = -9 ………..(iii)

Now from (iii), z = 3, substituting in (ii) we get y = 2. From (i) we get x = 1.


Exercises and Answers
1 7 − 1
3 − 5 4 
3. Find the rank of the matrix A =  
4 2 3
 
1 5 2
Answer: Rank of A is 3.

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.

Gauss Elimination Method


This is the elementary elimination method and it reduces the system of equations to an
equivalent upper triangular system which can be solved by back substitution. The
method is quite general and is well-adapted for computer operations.

Here we shall explain it by considering a system of three equations for sake of


simplicity.

Consider the equations

a1 x + b1y + c1z = d1

a2x + b2y + c2z = d2 …………………… (i)


a3x + b3y + c3z = d3

Step I: To eliminate x from second and third equations.

 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

b '2 y + c '2 z = d '2 ……………………(ii)

b '3 y + c '3 z = d '3

Here the first equation is called the pivotal equation and a1 is called the first pivot
element.

Step II: To eliminate y from third equation in (ii).

 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

b '2 y + c'2 z = d'2 ………………..(iii)

c'' 3 z = d ' 3

Here the second equation is the pivotal equation and b'2 is the new pivot element.

Step III: To evaluate the unknowns

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 

Using elementary row transformation, reduce the coefficient matrix A to an upper


triangular matrix.

a1 b1 c1 d1 
That is., [A|B] ~  0 b '2 c'2 d'2  ………………..(v)
 0 0 c'' 3 d ' 3 

From (v) the system of linear equations is equivalent to

a1 x + b1 y + c1z = d1

b '2 y + c'2 z = d'2

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.

Example: Solve by Gauss elimination method.

2x + y + 4z = 12

4x + 11y – z = 33

8x – 3y + 2z = 20

The augmented matrix of the system is

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

Now by the back substitution we get y = 2 and x = 3.

Example: Solve the following system of equations by Gauss elimination method.

5x + y + z + w = 4

x + 7y + z + w = 12

x + y + 6z + w = –5

x + y + z + 4w = –6

It is convenient to perform row transformation if the leading entry is 1. We shall write


the augmented matrix by interchanging the first equation with the fourth equation.
1 2 1 4 − 6 R1
1 7 1 1 12  R2

 A B  =  1 1 6 1 −5 R3
 
5 1 1 1 4 R4

Perform: R2 → R2 – R1, R3 → R3 – R1 and R4 → R4-5R1

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.

By back substitution we get, z = –1, y = 2, x = 1.

Therefore (x, y, z, w) = (1, 2, –1, –2) is the required solution.

Exercises and Answers


5. Solve the system
x-z–2= 0

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).

LU Decomposition Method to solve a System


LU Decomposition of a matrix
Let
 a11 a12 ... a1n 
a a 22 ... a 2n 
A =  21
 ... ... ... ... 
 
a n1 a n2 ... a nn 

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

Such a factorization, when it exists, is unique. Similarly, the factorization LU where


 l11 0 ... ... 0   1 u12 ... ... u1n 
l l 0 ... 0  0 1 u 22 ... u 2n 
L =  21 22 and U = 
 ... ... ... ... ...  ... ... ... ... ... 
   
ln1 l n2 l n3 ... l nn  0 0 0 ... 1 

is also a unique factorization.


2 3 1
Example 1: Factorize the matrix A = 1 2 3 into the LU form.
 3 1 2 

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 

From the above, we get


u11 = 2, u12 = 3, u13 = 1,
l21 = ½, l31 = 3/2
u22 = ½, u23 = 5/2
l32 = - 7 u33 = 18

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 

which can be written in the matrix form


AX =B
or
LUX = B ………………(2)
If we set
UX = Y ………………. (3)
then equation (2) becomes
LY = B ……………..…(4)
which is equivalent to the system
y1 = b1 
l21 y1 + y2 = b2 
l31 y1 + l32 y2 + y3 = b3 
 …….(5)

ln1 y1 + ln 2 y2 + + yn = bn 

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 

In example 1, we obtained the LU decomposition of A. This is


1 0 0 2 3 1 

L = 0.5 1 0 and U = 0 0.5 2.5 .
 
1.5 −7 1  0 0 18 

If Y = (y1, y2, y3)T, then the equation LY = B gives the solution:


y1 = 9, y2 = 3/2 and y3 = 5.
Finally, the matrix equation UX = Y, where X = (x, y, z)T,
gives the required solution
x = 35/18, y = 29/18, z = 5/18.

Tridiagonal Systems:

Consider the system of equations defined by

b1u1 + c1u2 = d1 
a2u1 + b2u2 + c2u3 = d 2 

a3u2 + b3u3 + c3u4 = d3  (1)


anun−1 + bnun = d n 

The matrix of the coefficients is


 b1 c1 0 0 0 
 a2 b2 c2 0 0 
0 a3 b3 c3 0 
A=  (2)
0 0 0 0 an−1 bn−1 cn−1 
 0 0 0 0 0 an bn 

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.

Thomas method to solve the above system is as follows:

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:

The solution ui is obtained from


cu
ui = i − i i +1 , i = n − 1, n − 2,...,1 where un =  n .
i

Example 1:

Solve the system

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

Applying step I, we get

3 4 5
1 = 2,  2 = ,  3 = ,  4 = .
2 3 4

Using step II, we obtain

4
1 = 0,  2 = 0, 3 = 0,  4 = .
5

Finally form step III, the solution is

4 3 2 1
u= , z= , y= , x= .
5 5 5 5

Exercise

6. Solve the system

2x + y = 0

3x + y + z = 1

2y + z + t = 0

3z – t = 2

7. Solve the system

2x + y =1

x + 2y + z = 3

y + 2z + u = 3

z + 2u =1

You might also like