Lecture 10 Putting It All Together 

 

Rank of a Matrix 

In this section we will be interested in a few new terms to characterize the work we have been doing through out the chapter we have just been studying.  The number of non-zero row remaining after we complete gauss elimination will be call the rank of the matrix.  We will see how to use the rank of the coefficient matrix of a system of equation and the rank of the augmented matrix obtained from the coefficient matrix and the right hand side can be used to determine if a system has a solution and if the solution is unique.   

 

Example 1. 

Consider the system   

2x - 4y = 3 

-6x + 13y -z =-6 

18x -38y +2z =2 

We will look at the rank of the coefficient matrix and the augmented matrix. 

> with(linalg):
 

> with(LinearAlgebra):
 

> A:=<<2,-6,18>|<4,13,-28>|<0,-1,2>>;
 

`:=`(A, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> A1:=gausselim(A);
 

Typesetting:-mrow(Typesetting:-mverbatim(
 

> b:=<<3,-6,2>>;
 

`:=`(b, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> A1b:=<<A|b>>;
 

`:=`(A1b, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> Aba:=GaussianElimination(A1b);
 

`:=`(Aba, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

>
 

> x:=BackwardSubstitute(Aba);
 

`:=`(x, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

As you can see we have a unique solution and we can say that the rank of A is three and the rank of the augmented matrix is also three.   

>
 

Example 2. 

We now look at another example and see what the rank of the coefficient matrix and the rank of the augmented matrix will tell us about the solutions to the system. 

3x +7y -3z =2 

2x + 5y +z =-4 

2x + 6y +10z = 3 

 

> AA:=<<3,2,2>|<7,5,6>|<-3,1,10>>;
 

`:=`(AA, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> GaussianElimination(AA);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> bb:=<2,-4,3>;
 

`:=`(bb, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> AAbb:=<AA|b>;
 

`:=`(AAbb, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> GaussianElimination(AAbb);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

We see that the system does not have a solution and furthermore we see that the rank of the coefficient matrix is two while the augmented matrix has a rank of three.   

 

Example 3.   

x - y + 2z = 1 

y + z = -2 

x -3y = 5 

 

> B:=<<1,0,1>|<-1,1,-3>|<2,1,0>>;
 

`:=`(B, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> GaussianElimination(B);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> Rank(B);
 

2
 

> c:=<1,-2,5>;
 

`:=`(c, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> Bc:=<B|c>;
 

`:=`(Bc, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> GaussianElimination(Bc);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> Rank(Bc);
 

2 (2.1.1)
 

> x:=BackwardSubstitute(%%);
 

`:=`(x, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

We see that the rank of the matrix is two and the rank of the augmented matrix is also two and we have an infinite number of solutions.   After this chapter we will be using the rank command first introduced in this example to determine the rank of matrices.  For this section you can use it as a check but you need to understand the idea of rank so I will want you to use Gauss elimination in the exercises.   

 

We summarize the above results in a theorem. 

 

Theorem 1.86 

The following are true concerning the system Ax = b and the nxn coefficient matrix A. 

i) A is invertible (equivalently A has a unique inverse) if and only if the above system has a unique solution (A is nonsingular).  The unique solution is given by x =A^(-1)b. 

ii) A is invertible if and only if det(A) is not zero. 

iii) A is invertible if and only if rank (A) = n. 

iv) A is invertible if and only if A has n pivots. 

v) The system has a solution if and only if rank(A) = rank([Ab]).  This solution is unique if and only if rank(A) = rank([Ab]) = n.   

 

 

>
 

Homogeneous Systems 

 

If Ax = 0 i.e. is called a system homogeneous system of equations.  It A is nonsingular then the system as a unique solution which is given by x=0. If A is singular then the solution will be of the form . 

  Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(=Typesetting:-mrow(Typesetting:-mi(+...Typesetting:-mrow(Typesetting:-mi(. where k<n.  The complete solution to a system of equation will always be of the form  

Typesetting:-mrow(Typesetting:-mi(  If A is nonsingular then Typesetting:-mrow(Typesetting:-mi( and we have only Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(.    

We will now look at the above examples in light of this new information. 

 

 

> A;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> b;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> LinearSolve(<A|b>);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

Here we have only the particular solution and the homogeneous part will be the zero vector.   For the matrix B we will have both a particular and a homogeneous part.   

 

> B;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> c;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

> x:=LinearSolve(<B|c>);
 

`:=`(x, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

The  homogeneous part is the coefficients of the paramenter _t0[3]   we do not need to parameter. i.e. 

> xh:=<-3,-1,1>;
 

`:=`(xh, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

> xp:=<-1,-2,0>;
 

`:=`(xp, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mo(
 

> B.xh;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

This is what we expected.  We get only te zero solution where.   

> B.xp;
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

The general solution is thus xp + k* xh where k is not the parameter.  
 

> B.(xp+k*xh);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn(
 

 

Exercises 

Exercise 1.9.1, Exercise 1.9.2, Exercise 1.9.3, Exercise 1.9.4  This set of exercises will be due on October 1, 2008 

>