In this lesson I will explain what the **range of a matrix** is and **how to calculate the range of a matrix** by determinants and by the Gauss method. You will learn how to calculate the range of any matrix, both square and non-square.

Índice de Contenidos

- 1 What is the range of a matrix?
- 2 How to calculate the range of a non-square matrix by determinants
- 3 How to calculate the range of a square matrix by determinants
- 4 What are linearly independent vectors?
- 5 Range of a matrix by the Gauss method
- 6 Exercises resolved on calculating the range of a matrix by the Gauss method

## What is the range of a matrix?

The range of an array can be defined in two ways. Let’s go to the first definition and below we’ll see the second:

The range of A is written as Rag A or rg(A).

Let’s look at this definition a little more slowly.

First, the order of a square matrix is the number of rows or columns in that matrix. For example, an array of order 2 is the same as saying an array of dimensions 2×2, which has 2 rows and 2 columns.

On the other hand, it is called submatrix, a matrix that is contained within another matrix. Within a matrix, we can choose rows and columns that form another independent matrix.

For example, in the following matrix of dimensions 3×4:

I can choose the following rows and columns within A:

That form the following square submtariz of order 3:

Or I can even choose columns that are not followed:

And it would have another square submatrix of order 3:

Or I can choose fewer rows and columns:

That would form a square matrix of order 2:

To calculate the range of a matrix, we must choose the sub-matrix with the highest possible order and calculate its determinant.

The order of the largest square sub-matrix, whose determinant is other than zero, will be the range of the matrix.

Let’s see an example in the next section.

## How to calculate the range of a non-square matrix by determinants

As we will see below, you can get the range of any matrix, without the need for it to be square.

What is the range of the next matrix?

It is a 3×4 matrix, so it is not a square matrix.

We have to choose the largest square sub-matrix contained in A to calculate its determinant, which is of order 3.

We will calculate the determinants of all possible square submatrices of order 3, until we find one whose determinant is different from 0. It is enough to find at least one square submatrice of order 3, whose determinant is different from 0, so that the range of the matrix A is 3.

We chose this square sub-matrix:

And we calculate its determinant:

Its result is non-zero, therefore, as the order of this sub-matrix is 3, the range of matrix A is 3.

If all the determinants of the submatrices of order 3 were equal to zero, we would have to continue with the submatrices of order 2, until we found a determinant that was different from 0 and in that case, the range of the matrix would be 2.

Let’s see another example: Calculate the range of the following matrix:

The largest square sub-matrices, contained in A, that we can choose are of order 3. We are going to calculate the determinants of all the possible square sub-matrices of order 3, until we find one whose determinant is different from 0.

We start by choosing the square sub-matrix formed by the first three columns:

Its determinant is zero, so we have to keep looking.

Try the square sub-matrix formed by columns 2, 3 and 4:

Its determinant is zero. We have to keep looking.

We choose the square sub-matrix formed by columns 1, 2 and 4:

Its determinant is also zero.

And finally, we choose the square sub-matrix formed by columns 1, 3 and 4:

That its determinant is also zero.

There are no more combinations of columns to continue choosing square submatrices of order 3. All square submatrices of order 3, which are contained in A are equal to zero, therefore, the range of A, will be less than 3:

Since we do not find any square sub-matrix of order 3, whose determinant is other than zero, we are going to try with square sub-matrixes of order 2.

It is enough to find one whose determinant is other than zero.

Try the square sub-matrix of order 2, made up of columns 1 and 2 and rows 1 and 2:

Its result is non-zero, so the range of the matrix is 2:

That matches the order of the largest square sub-matrix we have found, whose determinant is other than zero.

## How to calculate the range of a square matrix by determinants

Calculating the range of a square matrix is something simpler, since to begin with, we don’t have to be looking for the largest square submatrix, as the matrix itself.

However, if the matrix is of order 4 or higher, if we have several sub-matrixes of order 3 or lower to choose that are contained in the main matrix.

For example: What is the range of the next square matrix?

The largest square sub-matrix we can choose is the same matrix, so we start by calculating its determinant:

Which is non-zero, so the range of matrix A is range 4, which coincides with its order:

Let’s see a last example: Calculate the range of the following matrix:

We start by calculating the determinant of the matrix, since it is the largest square sub-matrix:

Its determinant is equal to zero. As we cannot choose more submatrices of order 4, the range of B is going to be less than 4:

We will therefore look for a square sub-matrix of order 3, contained in B, whose determinant is other than zero. Only if we find one, the range of B, will already be equal to 3.

We choose the square sub-matrix of order 3 formed by columns 1, 2 and 3 and rows 1, 2 and 3. We calculate its determinant:

Its determinant is different from zero, so we don’t have to search anymore and the range of B is 3:

Let us now see how to calculate the range of an array by the Gauss method and for that, before we must know what the linearly independent vectors are:

## What are linearly independent vectors?

Linearly independent vectors are the vectors whose formation does not depend on any other vector in the matrix, i.e. which cannot be composed from the linear composition of the rest of the vectors.

The linear vectors of an array is the number of vectors other than zero that remain after having triangulated the array formed by them.

Let’s see an example:

How many linearly independent vectors does the following matrix have?

To begin with, the vectors of an array we are referring to are the row vectors, i.e. each row of the array corresponds to a vector:

To obtain the number of linearly independent vectors, we are going to triangulate the matrix, that is to say, we are going to make the elements below the main diagonal zeros.

The first element of the first column is already 1. We only need that the elements that are below that 1 are zeros.

To achieve this, we subtract 4 times from row 2 to row 1 and leave the result in row 2:

And from row 3 we subtract row 1 3 times, leaving the result in row 3:

The matrix remains:

All that remains is for the last element of the second column to be zero. Therefore, we subtract row 2 from row 3 and leave the result in row 3:

We have left:

We are left with a row full of zeros. Therefore, this matrix has two linearly independent vectors and as a consequence, the other vector is dependent on the other two.

Vectors V1 and V2 are independent:

The vector V3, which is the one we have left with zeros, depends on V1 and V2. In fact, we can form the V3 subtracting V2 minus V1, or what is the same, row 3 is equal to row 2 minus row 1:

## Range of a matrix by the Gauss method

What is the range of a matrix?

At first we saw one of the definitions. Now let’s go to the second definition:

The range of an array is the number of linearly independent vectors in the array.

Therefore, calculating the number of linearly independent vectors and calculating the range of the matrix is exactly the same. So, the range of the previous matrix is 2, since it is the number of linear vectors it has:

It is also possible to calculate the range of a matrix by determinants as we have seen before.

Let’s see another example of how to calculate the range of a Gauss matrix:

What is the range of the next matrix?

Let’s start to triangulate the matrix, for it, in the first element of the first column, we have to make that there is a 1. We get it if we exchange row 3 for row 1:

The matrix is left:

Now we have to make that the elements below 1 in the first column are zeros. For it to the row 2 we add the row 1 and the result we leave it in the row 2:

And from row 3 we subtract row 1 twice, leaving the result in row 3:

The matrix looks like this:

The next thing we have to do is to make the last element of the second column a zero. To do this, we add row 2 to row 3, leaving the result in row 3:

The matrix is left:

We have already triangulated the matrix and we have not left any row with zeros, then the 3 vectors of the matrix are linearly independent. Therefore, as the matrix has 3 linearly independent vectors, its range is 3:

## Exercises resolved on calculating the range of a matrix by the Gauss method

Let’s do a couple of exercises on how to calculate the range of a matrix.

### Exercise 1

Calculate the range of the following matrix:

As you know, we have to triangulate the matrix.

We already have a 1 in the first element of the first column, so we have to make the rest of the elements of that column to be zeros.

We achieve this by subtracting row 2 twice from row 1 and leaving the result in row 2:

And adding row 1 to row 3 and the result is left in row 3:

The matrix remains:

We have to make zero the last element of the second column and to get it, to row 3 we add row 2 twice, leaving the result in row 3:

The matrix is left to us:

We have a row with zeros, then it means that we have 2 linearly independent vectors. Therefore, the range of the matrix is 2:

In the cases we have solved here, when triangulating the matrix we have 2 zeros in the first column and 1 zero in the second column, since the matrices had 3 rows. Remember that to triangulate the matrix is to make zeros below the main diagonal and that in each case it will be different, depending on the number of rows in the matrix.

As you can see, the procedure for calculating the range of an array is always the same. The following exercise is a little different, which will allow you to understand this concept a little more.

### Exercise 2

Calculates the range of the following matrix according to the value of “a”:

In this exercise we must say what is the range of the matrix, depending on the values that “a” can take. But we do not have to calculate the range of the matrix for the infinite values that “a” can take. We are only interested when the place occupied by “a” is zero or different from zero.

Let’s look at it more slowly.

To begin, we triangulate the matrix as always. To do this, we make zero the second element of the first column, subtracting row 1 from row 2 and leaving the result in row 2:

The third element of the first column, as we have the parameter “a”, we leave it as it is. The matrix is left:

We continue triangulating the matrix making zero the last element of the second column. To do this, we subtract row 2 from row 3 and leave the result in row 3:

The matrix is left:

In theory, the matrix is already triangulated. I say in theory, because we do not have a zero in the third element of the first column, but we have parameter “a”.

According to the matrix, we cannot reach any conclusion, since the range of the matrix would be 3 independently of the value of “a”, since in the last element of the third row we have a 2. Then the value of “a” does not influence the result.

However, if the rest of the elements of the third row were all zeros, the value of “a” would be decisive. Before we tell you why, let’s make that element zero.

We subtract row 1 twice from row 3. We leave the result in row 3:

The matrix is left:

Now it is clearer.

If the element a-4 is zero, from where a=4 is obtained, the matrix would have two linearly independent vectors, then its range would be 2:

For any other value of a than 4, i.e., that the element a-4 was different from zero, then the matrix has 3 linearly independent vectors and therefore its ranto is 3: