# Matrix Rank

The rank of a matrix is the number of linearly independent rows or columns. Using this definition, the rank can be calculated using the Gaussian elimination method.

It can also be said that the rank is the order of the largest nonzero square submatrix. Using this definition, the rank can be calculated using determinants.

The rank of a matrix is symbolized as: **rank(A)** or **r(A**).

### Calculating the Rank of a Matrix by the Gaussian Elimination Method

A line can be discarded if:

- All the coefficients are zeros.
- There are two equal lines.
- A line is proportional to another.
- A line is a linear combination of others.

r_{3} = 2 ** · **r_{1}

r_{4} is zero

r_{5} = 2r_{2} + r_{1}

r(A) = 2.

In general, eliminate the maximum possible number of lines, and the rank is the number of nonzero rows.

r_{2} = r_{2} − 3r_{1}

r_{3}= r_{3} − 2r_{1}

Therefore r(A) = 3.

#### Example

Calculate the rank of the following matrix:

**r _{1} − 2 r_{2}**

**r _{3} − 3 r_{2}**

**r _{3} + 2 r_{1}**

Therefore, r(A) =2.

### Calculating the Rank of a Matrix for Determimants

**1. **A line can eliminated a if:

All the coefficients are zeros.

There are two equal lines.

A line is proportional to another.

A line is a linear combination of others.

The third column can be deleted because it is a linear combination of the first two: **c _{3 } = c_{1} + c_{2} **

2. Check to see if the rank is 1, for it must be satisfied that the element of the matrix is not zero and therefore its determinant is not zero.

**|2|=2≠0**

3. The matrix will have a rank of 2 if there is a square submatrix of order 2 and its determinant is not zero.

4. The matrix will have a rank of 3 if there is a square submatrix of order 3 and its determinant is not zero.

As all the determinants of the submatrices are zero, it does not have a rank of 3, therefore r(B) = 2.

If the matrix had a rank of 3 and there was a submatrix of order 4, whose determinant was not zero, it would have had a rank of 4. In the same way as shown above, check to see if there is a rank greater than 4.

#### Examples

1.Calculate the rank of the matrix:

r(B) = 4

2. Calculate the rank of the matrix:

Remove the third column as it is zero, the fourth because it is proportional to the first and the fifth because it is the linear combination of the first and second: c_{5} = −2 · c_{1} + c_{2}

r(C) = 2