Docsity

Determinants on Maple or Matlab, Exams of Linear Algebra

Toggle sidebar
bg1
18.06 at ESG Spring, 2000
Determinants on Maple or Matlab
As promised, there is much more that can be done with Athena software to
avoid long computations. What I’ll do is include instructions for both Maple and
Matlab in this document, with the assumption that the reader has seen and used
some of the previous notes that give the basic instructions for the respective pro-
grams.
One thing that may be seen is that, as with Guass-Jordan elimination, matrices
are easier to enter and manipulate in Matlab than in Maple. It’s your choice, of
course.
Finding inverses and solving systems of equations can be done, as demonstrated
in previous notes, by using Gauss-Jordan elimination (row reduction, or reduced
rwo-echelon form); however, there are more direct commands on either program.
These notes will consider the following examples, all from the Problems Sections
of Apostol, Volume II.
•Page 80, Problem 4(c), for Maple only, as it requires symbolic manipulation.
The problem is, in effect, find the determinant of
1111
abcd
a
2b
2c
2d
2
a
3b
3c
3d
3
.
•Page 80, Problem 4(e), as an example of a long calculation that reduces to
one’s ability to type. The problem is, in effect, to find the determinant of
111111
111−1−1−1
11−1−111
1−1−11−11
1−11−111
1−1−111−1
.
•Page 95, Problem 5(a), solving the system
x+2y+3z=8
2x−y+4z=7
−y+z=1,
1
pf3

Partial preview of the text

Download Determinants on Maple or Matlab and more Exams Linear Algebra in PDF only on Docsity!

18.06 at ESG Spring, 2000

Determinants on Maple or Matlab

As promised, there is much more that can be done with Athena software to avoid long computations. What I’ll do is include instructions for both Maple and Matlab in this document, with the assumption that the reader has seen and used some of the previous notes that give the basic instructions for the respective pro- grams. One thing that may be seen is that, as with Guass-Jordan elimination, matrices are easier to enter and manipulate in Matlab than in Maple. It’s your choice, of course. Finding inverses and solving systems of equations can be done, as demonstrated in previous notes, by using Gauss-Jordan elimination (row reduction, or reduced rwo-echelon form); however, there are more direct commands on either program. These notes will consider the following examples, all from the Problems Sections of Apostol, Volume II.

  • Page 80, Problem 4(c), for Maple only, as it requires symbolic manipulation. The problem is, in effect, find the determinant of

 

a b c d a^2 b^2 c^2 d^2 a^3 b^3 c^3 d^3

  • Page 80, Problem 4(e), as an example of a long calculation that reduces to one’s ability to type. The problem is, in effect, to find the determinant of

   

^.

  • Page 95, Problem 5(a), solving the system

x + 2 y + 3 z = 8 2 x − y + 4 z = 7 −y + z = 1,

rendered in matrix form as  

x y z

 (^). 5(a)

The ASCII commands that appear here are in the file detcoms and may be cut and pasted into your Maple or Matlab session. It might be easier to do so one command at a time.

Maple

As in previous notes, the Maple prompt, >, will be given but should not be typed. Also, returns should be made only at the end of a command. As with the previous uses, load the linear algebra package with

with(linalg): and enter the matrix with A1:=matrix([[1,1,1,1],[a,b,c,d],[a^2,b^2,c^2,d^2], [a^4,b^4,c^4,d^4]]) The determinant is found with det(A1); While true, this is not the best form, and is not the form in which the answer appears in the text. We can recover this form with factor(%); where the percent sign, %, tells Maple to apply the command to the previous line. To find the determinant of a larger matrix with numerical entries, enter A2:=matrix([[1,1,1,1,1,1],[1,1,1,-1,-1,-1],[1,1,-1,-1,1,1], [1,-1,-1,1,-1,1],[1,-1,1,-1,1,1],[1,-1,-1,1,1,-1]]); being very careful with all the commas and brackets. (Remeber, if you want to break a line without entering a command, its Shift-Return.)Then, det(A2); returns the desired answer. To solve the system given as 5(a) above, enter the matrices B1:=matrix([[1,2,3],[2,-1,4],[0,-1,1]]); C1:=matrix([[8],[7],[1]]); Sovling the system by multiplying by an inverse involves typing out the words as D1:=multiply(inverse(B1),C1);

Matlab