MaplePortal/ExplorationsInLinearAlgebra - Help

Explorations in Linear Algebra

Go to Maple Portal

Introduction

The Student[LinearAlgebra] package contains numerous commands to assist students with concepts presented in an introductory course in Linear Algebra. In addition to the various computation commands, this package also comes equipped with visualization commands and interactive commands to single step through Linear Algebra concepts.  For an overview of the package, see Student[LinearAlgebra].

The commands and tutors provided in the Student[LinearAlgebra] package can be accessed by:

 1 Launching the tutor of choice from the Tools > Tutors menu and typing the equation.
 2 Loading the Student[LinearAlgebra] package using the with command (or by selecting the package from the Tools > Load Package menu). After the package is loaded, you can access the tutorials from the Context Panel for the expression of interest under Student[LinearAlgebra] > Tutors.

$\mathrm{with}\left(\mathrm{Student}\left[\mathrm{LinearAlgebra}\right]\right):$



Solving Systems of Linear Equations

Define M to be a 3-by-4 Matrix.

$M≔⟨⟨1,-1,3⟩|⟨1,-2,-7⟩|⟨2,3,1⟩|⟨5,-1,-5⟩⟩$

 $\left[\begin{array}{rrrr}1& 1& 2& 5\\ -1& -2& 3& -1\\ 3& -7& 1& -5\end{array}\right]$ (1)

For other ways to enter a matrix, see How Do I Enter a Matrix and Student[LinearAlgebra] .

The Student[LinearAlgebra] package allows you to walk through the stages of solving systems of equations either using Gaussian Elimination or Gauss-Jordan Elimination reduction methods.  At any stage in the problem, you can ask for a hint, apply a rule or jump to the matrix in reduced row echelon form. This step-through functionality is presented in an easy to use maplet interface.  When the matrix is in reduced row echelon form, these tutors give you the option to query for the rank, nullity, and bases for the row, column, and null spaces.  (The LinearSolveTutor will also let you see the solution in terms of equations.)  When finished, select Close to display the matrix in its reduced form to the Maple worksheet.

Reduce the Matrix M using the GaussianEliminationTutor.

$\mathrm{GaussianEliminationTutor}\left(M\right)$

 Figure 1:  Gaussian Elimination

To compute the results directly instead of single-stepping through this process, use the GaussianElimination function.

$\mathrm{GaussianElimination}\left(M\right)$

 $\left[\begin{array}{rrrr}1& 1& 2& 5\\ 0& -1& 5& 4\\ 0& 0& -55& -60\end{array}\right]$ (2)

To see a plot of this result, use the LinearSystemPlot function.

$\mathrm{LinearSystemPlot}\left(M\right)$

Inverses and Determinants

Using the Determinant function, you can easily calculate the determinant of a Matrix.  A Matrix is said to be invertible if the determinant of this Matrix does not equal zero.

$A≔⟨⟨\frac{1}{2},-5,0⟩|⟨-\frac{1}{3},\frac{14}{3},11⟩|⟨2,9,-\frac{5}{6}⟩⟩$

 $\left[\begin{array}{ccc}\frac{1}{2}& -\frac{1}{3}& 2\\ -5& \frac{14}{3}& 9\\ 0& 11& -\frac{5}{6}\end{array}\right]$ (3)

$\mathrm{Determinant}\left(A\right)$

 ${-}\frac{{2881}}{{18}}$ (4)

Since the determinant is non-zero, you can calculate the inverse of this Matrix.  The InverseTutor command is an interactive tutor that allows you to apply an elementary row operation, request a hint, go back a step, or request the solution.  After each computation, the previous and current states of the matrix are displayed, as well as text descriptions of the recently applied step.

$\mathrm{InverseTutor}\left(A\right)$



 Figure 2: Inverse Tutor

Vectors

The Student[LinearAlgebra] package also contains commands to calculate vectors.

Define two vectors:

$v≔⟨5,-3,2⟩$

 $\left[\begin{array}{r}5\\ -3\\ 2\end{array}\right]$ (5)

$w≔⟨4,2,1⟩$

 $\left[\begin{array}{r}4\\ 2\\ 1\end{array}\right]$ (6)

Display a plot of the sum of two vectors.  This works with 2-D or 3-D vectors.

$\mathrm{VectorSumPlot}\left(v,w\right)$

Calculate the cross product of two vectors.

$v&xw$

 $\left[\begin{array}{r}-7\\ 3\\ 22\end{array}\right]$ (7)

Display the cross product of two vectors.

$\mathrm{CrossProductPlot}\left(v,w,\mathrm{vectorcolors}=\left["Green","Red","Blue"\right]\right)$

Eigenvalues and Eigenvectors

The Student[LinearAlgebra] package provides two tutors where you can walk through the process of calculating the eigenvectors and eigenvalues of a Matrix in an easy-to-use interface. These tutors are similar, and the Eigenvectors Tutor is demonstrated as follows.

Define a Matrix.

$M≔⟨⟨-1,-3,-6⟩|⟨3,5,6⟩|⟨-3,-3,-4⟩⟩$

 $\left[\begin{array}{rrr}-1& 3& -3\\ -3& 5& -3\\ -6& 6& -4\end{array}\right]$ (8)

The EigenvectorsTutor takes you through the process of calculating the eigenvectors of a Matrix within a sequence of several windows.

 • You have the option of working through the process of finding the eigenvalues.  When asked Do you wish to go through the process of finding the eigenvalues?

 • Yes: the tutor takes you through the steps to find the eigenvalues

 • No: the tutor goes directly to a window displaying the eigenvalues
 • For each eigenvalue, you have the option of working through the process of finding the eigenvector.

 • Yes: the tutor takes you through the steps to find the eigenvalues

 • No: the tutor goes directly to a window displaying the eigenvalues
 • For each eigenvalue, you have the option of working through the process of finding the eigenvector.

 • Find Eigenvector: the tutor takes you through the steps

 • Skip Calculation: show the eigenvector without going through the steps

$\mathrm{EigenvectorsTutor}\left(M\right)$

 Figure 3: Find the eigenvalues in the Eigenvector Tutor

 Figure 4: Find the eigenvectors in the Eigenvector Tutor

To directly compute the eigenvalues and eigenvectors, use the Eigenvalues and Eigenvectors commands. The result of the Eigenvectors command is an expression sequence with two elements: the first is a vector whose elements are the eigenvalues, and the second is a Matrix whose column vectors consist of the corresponding eigenvectors.

$\mathrm{Eigenvectors}\left(M\right)$

 $\left[\begin{array}{c}{2}\\ {2}\\ {-4}\end{array}\right]{,}\left[\begin{array}{ccc}{-1}& {1}& \frac{{1}}{{2}}\\ {0}& {1}& \frac{{1}}{{2}}\\ {1}& {0}& {1}\end{array}\right]$ (9)

Plot the Eigenvectors.

$\mathrm{EigenPlot}\left(M,\mathrm{eigenoptions}=\left[\mathrm{length}=2\right],\mathrm{imageoptions}=\left[\mathrm{length}=2\right]\right)$

Linear Transformations

Plot the action of a linear transformation where the output can be an animation or a plot.

See ApplyLinearTransformPlot for more details.

Least Squares Approximation

The LeastSquaresPlot allows you to plot 2-D or 3-D points and a least squares fit to those points. The plot shows the least squares fit curve and boxes that represent the errors associated with the fit. See LeastSquaresPlot for more information.

$\mathrm{LeastSquaresPlot}\left(\left[\left[1,1\right],\left[2,3\right],\left[4,2.5\right],\left[5,4.1\right],\left[6,7.2\right]\right],\left[x,y\right],\mathrm{boxoptions}=\left[\mathrm{color}="LightSkyBlue",\mathrm{transparency}=.5\right]\right)$

To provide a better fit to the points, specify an algebraic curve.

$\mathrm{LeastSquaresPlot}\left(\left[\left[1,1\right],\left[2,3\right],\left[4,2.5\right],\left[5,4.1\right],\left[6,7.2\right]\right],\left[x,y\right],\mathrm{curve}=a{x}^{3}+b{x}^{2}+cx+d,\mathrm{boxoptions}=\left[\mathrm{color}="Magenta"\right]\right)$



Go to Maple Portal