DOC PREVIEW
U of U MATH 2250 - MATH 2250 Lecture Notes

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Math 2250Maple Project 2 Part A: Linear AlgebraOctober 2005Due date: See the internet due dates. Maple lab 2 has parts A (problems 2.1, 2.2, 2.3) and B (problems 2.4, 2.5, 2.6),issued in two different documents. This document is part A.References: Code in maple appears in 2250mapleL2a-F2005.txt at URL http://www.math.utah.edu/~gustafso/.This doc ument: 2250mapleL2a-F2005.pdf.Problem 2.1. (Matrix Algebra)Define A =1 2 34 5 67 8 9, B =2 1 01 2 10 1 2, v =123and w =−141. Create a worksheet in maple whichstates this problem in text, then defines the four objects. The worksheet should contain text, maple code and displays.Continue with this worksheet to answer (1)–(7) below. Submit problem 2.1 as a worksheet print on 8.5 by 11 inchpaper. See Example 1 for maple commands.(1) Compute AB and BA. Are they the same?(2) Compute A + B and B + A. Are they the same?(3) Let C = A + B. Compare C2to A2+ 2AB + B2. Expla in why they are different.(4) Compute the transpose of AB and compare it to the product of the transpose of A with the transpose of B,multiplied in the correct order so that you expect equality.(5) Solve for X in BX = v by three different methods.(6) Solve AY = v fo r Y. Do an answer check.(7) Solve AZ = w. Ex plain your answer.Problem 2.2. (Row space)Let A =1 1 1 2 62 3 −2 1 −30 1 −4 −3 −151 2 −3 −1 −9. Find three different bases fo r the row space of A, using the following methods .1. The method of Example 2, below.2. The maple commandrowspace(A) .3. The rref -method: select rows from rref(A).Verify that all three bases are equivalent.Problem 2.3. (Matrix Equations)Let A =8 10 3−3 −5 −3−4 −4 1, T =1 0 00 −2 00 0 5. Let P denote a 3 × 3 matrix. Assume the following result (provedbelow):Lemma 1. The equality AP = P T holds if and only if the columns v1, v2, v3of P satisfy Av1= v1,Av2= −2v2, Av3= 5v3.(a) Determine three specific columns for P such tha t det(P ) 6= 0 and AP = P T . Infinitely many answers are possible.See Example 4 for the maple method that determines a column of P . (b) After reporting the three columns, check theanswer by computing AP − P T (it should be zero) and det(P ) (it should be nonzero).Example 1. Let A =1 2 32 −1 13 0 −1and b =983. Define and display matrix A and vector b in maple. Thencompute(1) The inverse of A.(2) The augmented matrix C = aug(A, b).(3) The reduced row echelon form R = rref(C).(4) The column X of R which solves AX = b.(5) The matrix A3.(6) The transpose of A.(7) The matrix AC − 3A2.(8) The solution X of AX = b by two methods different than (4).Solution: To get help, enter?linalg into a worksheet, then select commands that match ones below.with(linalg):A:=matrix([[1,2,3],[2,-1,1],[3,0,-1]]);b:=vector([9,8,3]);print("(1)"); inverse(A);print("(2)"); C:=augment(A,b);print("(3)"); R:=rref(C);print("(4)"); X:=col(R,4);print("(5)"); evalm(A^3);print("(6)"); transpose(A);print("(7)"); evalm(A&*C-3*(A^2));print("(8)"); X:=linsolve(A,b); X:=evalm(inverse(A) &* b);Example 2. Let A =1 1 1 2 62 3 −2 1 −33 5 −5 1 −84 3 8 2 3.(1) Find a basis for the column space of A.(2) Find a basis for the row space of A.(3) Find a basis for the nullspace of A.(4) Find rank(A) and nullity(A).(5) Find the dimensions of the nullspace, row space and column space of A.Solution: The theor y applied: The columns of B corresponding to the leading ones in rref(B) are independent andform a basis for the column space of B. Results for the row space can be obtained by applying the above theory to thetranspose of the matrix .The maple code which applies iswith(linalg):A:=matrix([[ 1, 1, 1, 2, 6],[ 2, 3,-2, 1,-3],[ 3, 5,-5, 1,-8],[ 4, 3, 8, 2, 3]]);print("(1)"); C:=rref(A); # leading ones on columns 1,2,4BASIScolumnspace=col(A,1),col(A,2),col(A,4);print("(2)"); F:=rref(transpose(A)); # leading ones on columns 1,2,32BASISrowspace=row(A,1),row(A,2),row(A,3);print("(3)"); nullspace(A); linsolve(A,vector([0,0,0,0]));print("(4)"); RANK=rank(A); NULLITY=coldim(A)-rank(A);print("(5)"); DIMnullspace=coldim(A)-rank(A); DIMrowspace=rank(A);DIMcolumnspace=rank(A);Example 3. Let A =1 1 1 2 62 3 −2 1 −33 5 −5 1 −84 3 8 2 3. Verify that the following column space bases of A are equivalent.v1=1234, v2=1353, v3=2112,w1=100−3, w2=01017, w3=001−9.Solution: The maple code which applies iswith(linalg):A:=matrix([[ 1, 1, 1, 2, 6],[ 2, 3,-2, 1,-3],[ 3, 5,-5, 1,-8],[ 4, 3, 8, 2, 3]]);v1:=vector([1, 2, 3, 4]); v2:=vector([1, 3, 5, 3]); v3:=vector([2, 1, 1, 2]);w1:=vector([1, 0, 0, -3]); w2:=vector([0, 1, 0, 17]); w3:=vector([0, 0, 1, -9]);F:=augment(v1,v2,v3);G:=augment(w1,w2,w3);rank(A); rank(F); rank(G);rank(augment(A,v1))-rank(A);rank(augment(A,v2))-rank(A);rank(augment(A,v3))-rank(A);rank(augment(A,w1))-rank(A);rank(augment(A,w2))-rank(A);rank(augment(A,w3))-rank(A);The theory says that two bases of a subspace S of R4are equivalent. We justify that the proposed s e ts are independentand have the corr ect size (rank(F ) = rank(G) = rank(A)), and that all six vectors are in the column space of A(rank(aug(A, v)) = rank(A) if and only if AX = v has a solution X).Example 4. Let A =1 2 32 −1 13 0 0. Solve the equation Ax = −3 x for x.The maple details a ppear below. The idea is to write the problem as a homogeneo us problem (A + 3I)x = 0, whichalways has a solution.with(linalg):A:=matrix([[1,2,3],[2,-1,1],[3,0,0]]);linsolve(evalm(A+3*diag(1,1,1)),vector([0,0,0]));# ans: t_1*vector([-2,1,2])Proof of Lemma 1. Define r1= 1, r2= −2, r3= 5. Assume AP = P T , P = aug(v1, v2, v3) and T = diag(r1, r2, r3).The definition of matrix multiplication implies that AP = aug(Av1, Av2, Av3) a nd P T = aug(r1v1, r2v2, r3v3). ThenAP = P T holds if and only if the columns of the two matrices match, which is equivalent to the three equationsAv1= r1v1, Av2= r2v2, Av3= r3v3. The proof is complete.End of Maple Lab 2 Part


View Full Document

U of U MATH 2250 - MATH 2250 Lecture Notes

Documents in this Course
Syllabus

Syllabus

12 pages

Syllabus

Syllabus

12 pages

Syllabus

Syllabus

11 pages

Load more
Download MATH 2250 Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MATH 2250 Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MATH 2250 Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?