Linear Algebra Powertool
Dimension
On Line Section 2.2
Worksheet by Russell Blyth
> restart: with(linalg): with(plots): with(plottools):
Warning, the protected names norm and trace have been redefined and unprotected
Warning, the name changecoords has been redefined
Warning, the name arrow has been redefined
Outline
This worksheet covers material that corresponds to section 2.2 of the text.
The basic objectives are:
The Dimensions of the Column Space and Null Space of a Matrix
Let A be the matrix
> A := matrix(5,6,[[-1,2,6,-8,-14,3],[2,4,1,-8,5,-1],[-3,1,4,-9,-10,0],[3,-2,-1,12,-1,4],[5,7,11,-11,-19,9]]);
Compute the rank of A:
> rank(A);
How does the rank of A relate to the dimensions of the vector spaces we are interested in studying? Let's row reduce A next:
> RedMat := gaussjord(A);
We conclude that:
Let's see how to write the final three column vectors of A as linear combinations of the first three columns:
>
B:= delcols(A,4..6);
v4:=col(A,4);v5:=col(A,5);v6:=col(A,6);
linsolve(B,v4);
linsolve(B,v5);
linsolve(B,v6);
Check:
>
v1:=col(A,1);v2:=col(A,2);v3:=col(A,3);
evalm(2*v1-3*v2); evalm(2*v2-3*v3); evalm(v1-v2+v3);
Thus the first three columns of A are a basis for the column space (why are they linearly independent?). The remaining three columns of A are each linear combinations of the first three columns. Note that the vectors in the column space are vectors in
What is the dimension of the column space of A?
Now find a basis for the null space of A, that is, for the solution space of AX = 0.
>
Z:=vector(5,[0,0,0,0,0]);
nullspace:=linsolve(A,Z);
Get a basis by
>
y1:=subs(_t[1]=1,_t[2]=0,_t[3]=0,op(nullspace));
y2:=subs(_t[1]=0,_t[2]=1,_t[3]=0,op(nullspace));
y3:=subs(_t[1]=0,_t[2]=0,_t[3]=1,op(nullspace));
Let's check these:
> evalm(A&*y1); evalm(A&*y2); evalm(A&*y3);
So {y1, y2, y3} is a basis for the null space of A. Note that the vectors in the null space are in
.
What is the dimension of the null space?
What is the sum of the rank (the dimension of the column space) and the dimension of the null space?
Maple provides direct commands to find bases for the column space and null space:
> colspan(A,'d'); d;
> kernel(A);
Exercises:
1) Repeat all the above for the matrix:
> E:=matrix(4,6,[[-1,2,0,4,5,-3],[3,-7,2,0,1,4],[2,-5,2,4,6,1],[4,-9,2,-4,-4,7]]);
>
>
>