|\^/| Maple V Release 3 (University of Florida) ._|\| |/|_. Copyright (c) 1981-1994 by Waterloo Maple Software and the \ MAPLE / University of Waterloo. All rights reserved. Maple and Maple V <____ ____> are registered trademarks of Waterloo Maple Software. | Type ? for help. PROBLEM CI(a): I've already input the A matrix into Maple. [ 0 0 1 1 2 ] [ ] [ 0 2 5 1 0 ] A := [ ] [ 0 1 2 0 -1 ] [ ] [ 1 0 1 0 0 ] The exam-designer kindly made A easy to row-reduce by hand... > R := swaprow(A,1,4) : R := swaprow(R,2,3); [ 1 0 1 0 0 ] [ ] [ 0 1 2 0 -1 ] R := [ ] [ 0 2 5 1 0 ] [ ] [ 0 0 1 1 2 ] > R := addrow(R,2,3,(-2)); [ 1 0 1 0 0 ] [ ] [ 0 1 2 0 -1 ] R := [ ] [ 0 0 1 1 2 ] [ ] [ 0 0 1 1 2 ] > R := addrow(R,3,4,(-1)); [ 1 0 1 0 0 ] [ ] [ 0 1 2 0 -1 ] R := [ ] [ 0 0 1 1 2 ] [ ] [ 0 0 0 0 0 ] Part (a1): Thus rank(A) = #pivots = 3. Hence nullity(A) = #cols - rank = 5 - 3 = 2. ================================================================ Part (a3): The rowspaces of R and A are equal, so lets pick a basis for Row(R). Naturally, the first three rows of R work. I'll write them vertically, as the exam asked. > convertvec := v -> convert(v, matrix) : # Converting Maple vectors to col-vectors. > A_basis_for_rowA := map(convertvec, {seq(row(R,i), i=1..3)}); [ 1 ] [ 0 ] [ 0 ] [ ] [ ] [ ] [ 0 ] [ 1 ] [ 0 ] [ ] [ ] [ ] A_basis_for_rowA := {[ 1 ], [ 2 ], [ 1 ]} [ ] [ ] [ ] [ 0 ] [ 0 ] [ 1 ] [ ] [ ] [ ] [ 0 ] [ -1 ] [ 2 ] ================================================================ Part (a4): In contrast, the *column* spaces of R and A need not be equal. But the pivot columns of A form a basis for Col(A). Since the first 3 columns of A indeed have pivots, let's use those. > A_basis_for_colA := map(convertvec, {seq(col(A,i), i=1..3)}); [ 0 ] [ 1 ] [ 0 ] [ ] [ ] [ ] [ 2 ] [ 5 ] [ 0 ] A_basis_for_colA := {[ ], [ ], [ ]} [ 1 ] [ 2 ] [ 0 ] [ ] [ ] [ ] [ 0 ] [ 1 ] [ 1 ] Note, by the way, that Maple wrote the first 3 columns, but in a different order. (This is because the braces, {} mean a *set* to Maple, so Maple can freely change the order of the elements in the set.) ================================================================ Part (a5): If we add the first two Col(A) basis-vectors, we get transpose([1 7 3 1]) So adding-in twice the third basis-vector gives transpose([1 7 3 3]). Hence y = 7 <---- and this was how I intended you to do part (a5); by inspection. In contrast, a brute-force method to solve for y is to augment the matrix whose cols are the basis-vectors: > evalm(augmentedmatrix), rref(augmentedmatrix, 3) ; [ 0 1 0 1 ] [ 1 0 0 9 - y ] [ ] [ ] [ 0 5 2 y ] [ 0 1 0 y - 6 ] [ ], [ ] [ 0 2 1 3 ] [ 0 0 1 15 - 2 y ] [ ] [ ] [ 1 1 0 3 ] [ 0 0 0 7 - y ] So the lefthand matrix has the three basis-vectors as columns, followed by the target column. The righthand matrix is the rref'ed version. To make it consistent, the "7-y" must be zero, so y must equal 7. ================================================================ Part (a2): Recall R: > evalm(R); [ 1 0 1 0 0 ] [ ] [ 0 1 2 0 -1 ] [ ] [ 0 0 1 1 2 ] [ ] [ 0 0 0 0 0 ] Since Nul(A)=Nul(R), it suffices to get a basis for Nul(R), using the free columns in R. So we can plug in any two lin.indep pairs for (x4,x5), and solve for x3,x2,x1. An easy choice is to plug in (0,1) for (x4,x5), then plug in (1,0). It is faster for me to do this by hand than it is to use Maple, but let me use this as an excuse to show you some equation-solving commands in Maple. BEFORE reading the next section, type to Maple: ?solve ?assign > xcol := matrix(5,1,[x1,x2,x3,x4,x5]); setequaltozero := evalm(R &* xcol); [ x1 ] [ ] [ x2 ] [ ] xcol := [ x3 ] [ ] [ x4 ] [ ] [ x5 ] [ x1 + x3 ] [ ] [ x2 + 2 x3 - x5 ] setequaltozero := [ ] [ x3 + x4 + 2 x5 ] [ ] [ 0 ] To be in Null(A), this 4-vector must be all zeros. So setting any values for (x4,x5), we can solve for x3,x2,x1 by back-substitution. I'm going to directly solve, by back-substitution, for x3,x2,x1, and put the list of solutions in a variable called "solns". > eqns := {seq(setequaltozero[i,1] = 0, i=1..3)}; solns := solve(eqns, {x1,x2,x3}); eqns := {x3 + x4 + 2 x5 = 0, x2 + 2 x3 - x5 = 0, x1 + x3 = 0} solns := {x3 = - x4 - 2 x5, x2 = 2 x4 + 5 x5, x1 = x4 + 2 x5} Now I plug in (0,1) for (x4,x5), and solve for the other variables. > x4 := 0; x5 := 1; assign(solns); # The `assign' command will assign x3,x2,x1. x4 := 0 x5 := 1 Here is a good name for this vector in Null(A) which is generated by (x4,x5)=(0,1). > nullspacevec01 := map(eval, xcol); [ 2 ] [ ] [ 5 ] [ ] nullspacevec01 := [ -2 ] [ ] [ 0 ] [ ] [ 1 ] Now we unset all five variables and solve again, this time with (x4,x5) := (1,0). > x1 := 'x1': x2 := 'x2': x3 := 'x3': x4 := 'x4': x5 := 'x5': > x4 := 1; x5 := 0; assign(solns); nullspacevec10 := map(eval, xcol); x4 := 1 x5 := 0 [ 1 ] [ ] [ 2 ] [ ] nullspacevec10 := [ -1 ] [ ] [ 1 ] [ ] [ 0 ] It is trivial to see that our pair of vectors is a lin.indep. set. Finally, we apply the "LNBS" philosophy (Lets Not Be Stupid); we check that our two computed vectors *ARE ACTUALLY* in Null(A)! > evalm(A &* nullspacevec01) , evalm(A &* nullspacevec10); [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 0 ] Whoa, dude! So... > A_basis_for_nullA := map(evalm,{nullspacevec01, nullspacevec10}); [ 2 ] [ 1 ] [ ] [ ] [ 5 ] [ 2 ] [ ] [ ] A_basis_for_nullA := {[ -2 ], [ -1 ]} [ ] [ ] [ 0 ] [ 1 ] [ ] [ ] [ 1 ] [ 0 ] ================================================================ #### End of File ####