next up previous
Next: Exercise 1 Up: A closer look at Previous: A closer look at

How to use MATLAB to study the row space of a matrix?

1. Enter your matrix A in MATLAB.

2. Find $rref(A)$.

3. Non-zero rows of $rref(A)$ form a basis for $ row(A) .$

4. Find $rank(A)$ it should be equal to the number of the non-zero rows of $rref(A).$

Example 2

Enter $A= \left[ \begin{array}{rrr}1 &2 & 3 \\ 4 & 0 &1 \end{array} \right] $ in MATLAB and find $rref(A)$ you should get

$ \left[ \begin{array}{rrr}1 &0 & 1/4 \\ 0 & 1 &11/8 \end{array} \right] $

So, as you were expecting, there are two non-zero rows in $C=rref(A).$ That means the row space of A is a 2 -dimensional subspace of $R^3$. One basis for this subspace ( row(A) ) is formed by the vectors $( 1, 0, 1/4)$ and $(0, 1, 11/8)$.

If you find $rank(A)$ it will give you $ rank(A)=2 $ which is the dimension of the $ row(A) .$

Example 3

Enter $ B= A'$ or type $B = \left[ \begin{array}{rr}1 & 4 \\ 2 & 0 \\ 3 & 1 \\ \end{array} \right] $ and find $ D=rref(B)$ you should get

$D = \left[ \begin{array}{rr}1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] $

So the row space of $B$ is a 2-dimentional subspace of $R^2 .$ That is $ row(B) = R^2 $ (why?). And the non-zero row of D form a basis for $R^2$.

If you find $ rank(B) $ it will be 2.

Notice that the matrix in example 3 is the transpose of the matrix in example 2. Both sub spaces have the same dimension ( = 2 ) but they are subspaces of different vector spaces.

The $row(A)$ in example 2 is a two-dimensional subspace of $ R^3.$ But $row(A)$ in example 3 is a two-dimensional subspace of $R^2 .$

Also note that the subspace in example 3, $row (B)= row (A') $ is the column space of the matrix in example 2. In general one can prove that dimension of the row space of a matrix is equal to the dimension of the column space of the matrix, which is called $ rank(A).$

NOTE

1. Row operations do not change the solution set of a matrix.

2. Row operations do not change the row space of a matrix.

2. Row operations can change the column space of a matrix.


next up previous
Next: Exercise 1 Up: A closer look at Previous: A closer look at
Ali A. Daddel 2002-11-21