# Rank of a Matrix

The rank of a matrix is the number of lines in the matrix (rows or columns) that are linearly independent.

A line is **linearly dependent** on another one or others when a linear combination between them can be established.

A line is **linearly independent** of another one or others when a linear combination between them cannot be established.

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

#### Calculating the Rank of a Matrix

The Gaussian elimination method is used to calculate the rank of a matrix.

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 range 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