Section 2.2

The Rank of a Matrix

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

>

>

Introduction

Recall from section 1.6:

*****************************************************************

The ROW SPACE of an nxm matrix A is the space spanned by the rows of the matrix A.

Since the span of a set of vectors is a subspace, the row space of an nxm matrix A is a

subspace of R^m .

The COLUMN SPACE of an nxm matrix A is the space spanned by the columns of the

matrix A.

Since the span of a set of vectors is a subspace, the column space of an nxm matrix A is a

The NULL SPACE of an nxm matrix A is the solution set to Ax=0.

*****************************************************************

Example 1: Find the dimension of the column space and row space.

> A:=matrix([[1,2,3],[6,-3,-8],[8,1,-2]]);

A := matrix([[1, 2, 3], [6, -3, -8], [8, 1, -2]])

>

> rref(A);

matrix([[1, 0, -7/15], [0, 1, 26/15], [0, 0, 0]])

>

Rank of a matrix

********************************************************************

Let A be an m x n matrix. The dimension of the row space of A is equal to the dimension

of the column space of A. The common dimension, the rank of A, is the number of pivots

in row echelon form of A.

********************************************************************

Example 2 : Determine the rank and a basis for the row space and column space of the matrix

> A:=matrix([[1,8,3,5],[6,-3,7,11],[8,1,-2,10],
[14,-2,5,21]]);

A := matrix([[1, 8, 3, 5], [6, -3, 7, 11], [8, 1, -...

>

Apply Gauss elimination to find the reduced row echelon form of A

> rref(A);

matrix([[1, 0, 0, 854/633], [0, 1, 0, 164/633], [0,...

>

Example 3: Determine the rank and a basis for the column space and row space of the matrix

> A:=matrix([[1,8,3,5],[6,-3,7,11],[8,1,-2,10],
[14,-2,5,21]]);

A := matrix([[1, 8, 3, 5], [6, -3, 7, 11], [8, 1, -...

>

> rref(A);

matrix([[1, 0, 0, 854/633], [0, 1, 0, 164/633], [0,...

>

Procedure for finding bases for spaces associated with a matrix

***************************************************************

Let A be an m x n matrix with row-echelon form H.

1.) For a basis of the row space of A, use the non-zero rows of H.

2.) For a basis of the column space of A, use the columns of A corresponding

to the columns of H containing pivots.

3.) For a basis of the nullspace of A, use H and back substitution to solve Hx=0

in the usual way.

*****************************************************************

Example 4: Determine the rank and a basis for the row space, column space and null space of the matrix

> A:=matrix([[1,8,3,4,12],[6,-3,7,12,15],
[-8,3,-2,10,18],[-7,11,1,14,31]]);

A := matrix([[1, 8, 3, 4, 12], [6, -3, 7, 12, 15], ...

>

Apply Gauss elimination to find the reduced row echelon form of A

> rref(A);

matrix([[1, 0, 0, -178/77, 0], [0, 1, 0, -18/35, 0]...

>

Nullity

********************************************

Let A be an m x n matrix.

The null space, the solution to the equation Ax=0, has a basis

with as many vectors as free variables.

The dimension of the null space of A is called the nullity of A.

- Dimension of the column space is the number of pivot elements (number of lead variables)

- Dimension of the null space is the number of non-pivot elements (number of free variables)

- Total number of columns is n

rank(A) + nullity(A) = n

***************************************************

Example 5: Find the rank and nullity of the following matrix.

>

> A:=matrix([[0,-4,2,8],[4,9,-3,-11],[4,5,-1,-3]]);

A := matrix([[0, -4, 2, 8], [4, 9, -3, -11], [4, 5,...

>

> rref(A);

matrix([[1, 0, 3/8, 7/4], [0, 1, -1/2, -2], [0, 0, ...

>

An n x n matrix A is invertible if and only if rank(A) = n. Why?

Exercise

1, 3, 4, 5, 8, 11, 12.