# Rank of a Matrix and Some Special Matrices

The maximum number of its linearly independent columns (or rows ) of a matrix is called the rank of a matrix. The rank of a matrix cannot exceed the number of its rows or columns.

If we consider a square matrix, the columns (rows) are linearly independent only if the matrix is nonsingular. In other words, the rank of any nonsingular matrix of order m is m. Rank of a matrix A is denoted by ρ(A).

The rank of a null matrix is zero. A null matrix has no non-zero rows or columns. So, there are no independent rows or columns. Hence the rank of a null matrix is zero.

## How to find the Rank of a Matrix?

To find the rank of a matrix, we will transform that matrix into its echelon form.

Then determine the rank by the number of non zero rows.

Consider the following matrix.

A = $\begin{bmatrix} 2 & 4 &6 \\ 4& 8& 12 \end{bmatrix}$

While observing the rows, we can see that the second row is two times the first row. Here we have two rows. But it does not count. The rank is considered as 1.

Consider the unit matrix

A = $\begin{bmatrix} 1 &0 &0 \\ 0& 1 & 0\\ 0 & 0 &1 \end{bmatrix}$

We can see that the rows are independent. Hence the rank of this matrix is 3.

The rank of a unit matrix of order m is m.

If A matrix is of order m×n, then ρ(A ) ≤ min{m, n } = minimum of m, n.

If A is of order n×n and |A| ≠ 0, then the rank of A = n.

If A is of order n×n and |A| = 0, then the rank of A will be less than n.

### Rank of a Matrix by Row- Echelon Form

We can transform a given non-zero matrix to a simplified form called a Row-echelon form, using the row elementary operations . In this form, we may have rows all of whose entries are zero. Such rows are called zero rows. A non-zero row is one in which at least one of the elements is not zero.

For example, consider the following matrix.

A = $\begin{bmatrix} 1 &0 &2 \\ 0& 0 & 1\\ 0 & 0 & 0 \end{bmatrix}$

Here R1 and R2 are non zero rows.

R3 is a zero row.

A non-zero matrix A is said to be in a row-echelon form if:

(i) All zero rows of A occur below every non-zero row of A.

(ii) The first non-zero element in any row i of A occurs in the jth column of A, then all other elements in the jth column of A below the first non-zero element of row i are zeros.

(iii) The first non-zero entry in the ith row of A lies to the left of the first non-zero entry in ( i + 1)th row of A.

Note: A non-zero matrix is said to be in a row-echelon form, if all zero rows occur as bottom rows of the matrix and if the first non-zero element in any lower row occurs to the right of the first non-zero entry in the higher row.

If a matrix is in row-echelon form, then all elements below the leading diagonal are zeros.

Consider the following matrix.

A = $\begin{bmatrix} 0 &0 &1 \\ 0& 0 & 5\\ 0 & 0 & 0 \end{bmatrix}$

Check the rows from the last row of the matrix. The third row is a zero row. The first non-zero element in the second row occurs in the third column and it lies to the right of the first non-zero element in the first row which occurs in the second column. Hence the matrix A is in row echelon form.

### Rank of a Matrix Solved Examples

Example 1:

Find the rank of matrix A by using the row echelon form.

A = $\begin{bmatrix} 1 &2 &3 \\ 2& 1 & 4\\ 3 & 0 & 5 \end{bmatrix}$

Solution:

Given A = $\begin{bmatrix} 1 &2 &3 \\ 2& 1 & 4\\ 3 & 0 & 5 \end{bmatrix}$

Now we apply elementary transformations.

R2 → R2 – 2R1

R3 → R3 – 3R1

We get

$\begin{bmatrix} 1 &2 &3 \\ 0& -3 & -2\\ 0 & -6 & -4 \end{bmatrix}$

R3 → R3 – 2R2

$\begin{bmatrix} 1 &2 &3 \\ 0& -3 & -2\\ 0 & 0 & 0 \end{bmatrix}$

The above matrix is in row echelon form.

Number of non-zero rows = 2

Hence the rank of matrix A = 2

Example 2:

Find the rank of the matrix A = $\begin{bmatrix} 1 &2 &3 \\ 2& 3 &4\\ 3 & 5 & 7 \end{bmatrix}$

Solution:

Given A = $\begin{bmatrix} 1 &2 &3 \\ 2& 3 &4\\ 3 & 5 & 7 \end{bmatrix}$

Now we transform the matrix A to echelon form by using elementary transformation.

R2 → R2 – 2R1

R3 → R3 – 3R1

$\begin{bmatrix} 1 &2 &3 \\ 0& -1 &-2\\ 0 & -1 & -2 \end{bmatrix}$

R3 → R3 – R2

$\begin{bmatrix} 1 &2 &3 \\ 0& -1 &-2\\ 0 & 0 & 0 \end{bmatrix}$

Number of non-zero rows = 2

Hence the rank of matrix A = 2

Example 3:

Find the rank of the matrix.

$\begin{bmatrix} 1 &1 &1 \\ 1& 1 &1\\ 1 & 1 & 1 \end{bmatrix}$

Solution:

Given

$\begin{bmatrix} 1 &1 &1 \\ 1& 1 &1\\ 1 & 1 & 1 \end{bmatrix}$

R2 → R2 – R1

R3 → R3 – R1

We get

$\begin{bmatrix} 1 &1 &1 \\ 0& 0 &0\\ 0 & 0 & 0 \end{bmatrix}$

Here number of non zero rows = 1

Hence the rank of the matrix = 1

Example 4:

Find the rank of the 2×2 matrix B = $\begin{bmatrix} 5 & 6\\ 7& 8 \end{bmatrix}$

Solution:

Given B = $\begin{bmatrix} 5 & 6\\ 7& 8 \end{bmatrix}$

Order of B = 2×2

|B| = 40 – 42 = -2 ≠ 0

So the rank of B = 2

Example 5:

Given A = $\begin{bmatrix} 4& 7\\ 8& 14 \end{bmatrix}$

Find the rank of matrix A.

Solution:

Given

A = $\begin{bmatrix} 4& 7\\ 8& 14 \end{bmatrix}$

By observing the rows, we can see that elements of the second row are twice the elements of the first row.

R1→ 2R1 – R2

$\begin{bmatrix} 0& 0\\ 8& 14 \end{bmatrix}$

Number of non zero rows = 1

Rank of matrix A = 1.

Example 6:

The rank of the matrix M is

M = $\begin{bmatrix} 0 & 1 & 1\\ 1& 0 &1 \\ 1& 1& 0 \end{bmatrix}$

a) 1

b) 2

c) 3

d) 0

Solution:

M = $\begin{bmatrix} 0 & 1 & 1\\ 1& 0 &1 \\ 1& 1& 0 \end{bmatrix}$

Apply row transformations to make the matrix into echelon form.

Interchange R2 and R1.

$\begin{bmatrix} 1 & 0 & 1\\ 0& 1 &1 \\ 1& 1& 0 \end{bmatrix}$

R3 → R3 – R1

$\begin{bmatrix} 1 & 0 & 1\\ 0& 1 &1 \\ 0& 1& -1 \end{bmatrix}$

R3 → R3 – R2

$\begin{bmatrix} 1 & 0 & 1\\ 0& 1 &1 \\ 0& 0& -2 \end{bmatrix}$

Divide R3 by -2

$\begin{bmatrix} 1 & 0 & 1\\ 0& 1 &1 \\ 0& 0& 1 \end{bmatrix}$

Since there are three non zero rows, rank = 3

Hence option (c) is the answer.

Example 7:

The rank of the following matrix is

$\begin{bmatrix} 1 & 1 & 0& -2\\ 2& 0& 2 & 2\\ 4& 1 & 3 & 1 \end{bmatrix}$

a) 1

b) 2

c) 3

4) 4

Solution:

Given $\begin{bmatrix} 1 & 1 & 0& -2\\ 2& 0& 2 & 2\\ 4& 1 & 3 & 1 \end{bmatrix}$

We transform the matrix using elementary row operations.

R2 → R2 – 2R1

$\begin{bmatrix} 1 & 1 & 0& -2\\ 0& -2& 2 & 6\\ 0& -3 & 3 & 9 \end{bmatrix}$

R2 → R2/-2

$\begin{bmatrix} 1 & 1 & 0& -2\\ 0& 1& -1 &-3\\ 0& -3 & 3 & 9 \end{bmatrix}$

R3 → R3 + 3R2

$\begin{bmatrix} 1 & 1 & 0& -2\\ 0& 1& -1 &-3\\ 0& 0 & 0 & 0 \end{bmatrix}$

Since the number of non zero rows is 2, rank = 2

Hence option (b) is the answer.

Example 8:

Let P = $\begin{bmatrix} 1 & 1 & -1\\ 2 & -3& 4\\ 3 & -2 & 3 \end{bmatrix}$

And Q = $\begin{bmatrix} -1 & -2 & -1\\ 6& 12& 6\\ 5 & 10 & 5 \end{bmatrix}$

be two matrices. Then the rank of P + Q =

a) 1

b) 0

c) 2

d) 3

Solution:

Given P = $\begin{bmatrix} 1 & 1 & -1\\ 2 & -3& 4\\ 3 & -2 & 3 \end{bmatrix}$

Q = $\begin{bmatrix} -1 & -2 & -1\\ 6& 12& 6\\ 5 & 10 & 5 \end{bmatrix}$

P + Q = $\begin{bmatrix} 0 & -1 & -2\\ 8& 9& 10\\ 8& 8 & 8 \end{bmatrix}$

Interchange C1 and C2

$\begin{bmatrix} -1 & 0 & -2\\ 9& 8& 10\\ 8& 8 & 8 \end{bmatrix}$

R2 → R2 + 9R1

R3 → R3 + 8R1

$\begin{bmatrix} -1 & 0 & -2\\ 0& 8& -8\\ 0& 8 & -8 \end{bmatrix}$

R3 → R3 – R2

$\begin{bmatrix} -1 & 0 & -2\\ 0& 8& -8\\ 0& 0 & 0 \end{bmatrix}$

R2 → R2/8

$\begin{bmatrix} -1 & 0 & -2\\ 0& 1& -1\\ 0& 0 & 0 \end{bmatrix}$

Number of non zero rows = 2

So the rank = 2

Hence option (c) is the answer.