

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions on how to create matrices and vectors in maple, and then solve linear equations using these matrices. It covers various ways to create matrices, the concept of row and column vectors, and the use of maple's linearalgebra package. The document also includes exercises for students to practice creating matrices and solving linear equations.
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


First, lets start with a little notation. A matrix has size 4 × 5 if it has 4 rows and 5 columns. Generally speaking, a matrix has size m × n if it has m rows and n columns. We want to introduce how to enter matrices into Maple. Open up Maple, and enter the following code. with(LinearAlgebra); with(Student[LinearAlgebra]); This loads the linear algebra package into Maple. Let’s create a (coefficient) matrix. There are several ways to go about doing this. Try entering all of the following lines and see what happens. M := Matrix([[1, 2, 3], [4, 5, 6], [7,8,10]]); N := Matrix(1,4); L := Matrix(3,2); L[1,2] := 2; L[2,1] := 5; L[3,2] := -1; L; K := RandomMatrix(3,4); One often thinks of a matrix M as a list of rows (or sometimes column) vectors. A column vector is a vertical vector. A row vector is a horizontal vector. We create vectors in Maple by doing the following. v := Vector([1,2,3]); w := Matrix(3,1); u :=<4,2,1>; We can then turn these vectors into a matrix as follows P := ; R :=; If we want to create row vectors, we can do the following (note we can also combine them into a matrix) a := Vectorrow; b := Matrix(1,3); b[1,2] := 8; c :=<1|0|1>; Q :=;
1
Ok, now that we know how to create matrices and vectors, lets solve some linear equations! First lets make sure we understand the setup. If we think of the following matrices as augmented matrices corresponding to systems of equations, how many variables and how many equations are in each: In L, M , P , R, K, Q, how many equations, how many variables?
Translate L and R into systems of equations. Can you immediately tell if either are consistent or inconsistent (consistent means there is at least one solution). Use row reduction to solve these equations.
Check your work (and some other matrices) using the following commands. L2 := ReducedRowEchelonForm(L); R2 := ReducedRowEchelonForm(R); M2 := ReducedRowEchelonForm(M); K2 := ReducedRowEchelonForm(K); ReducedRowEchelonForm(); Maple can solve linear equations as well. Try the following code. Then try to interpret what Maple tells you in terms of the row reduced forms. LinearSolve(L); LinearSolve(R); LinearSolve(M); LinearSolve(K);