Overview of the LinearAlgebra Package
Basic Functionality
Interfaces to the LinearAlgebra Package
Essential LinearAlgebra Package Commands
Examples
Details
Description
The LinearAlgebra package offers routines to construct and manipulate Matrices and Vectors, compute standard operations, query results and solve linear algebra problems.
For a complete list of the routines in the LinearAlgebra package, see the Details of the LinearAlgebra Package help page.
Output
Matrix, Vector, or an expression sequence of the two. Matrices 10 x 10 or smaller and vectors 10 x 1 and smaller display the corresponding Matrix or Vector in the Maple worksheet. Matrices and vectors larger then this display a placeholder as output. To see the entries or structured views of the Matrix or Vector, double-click the placeholder. For more details, see the browse Matrix help page.
Commands
Each command in the LinearAlgebra package is accessed by using either the long form or the short form of the command name in the command calling sequence. For more information, see the Using Packages help page.
Long form
LinearAlgebra:-RandomMatrix(2);
Short form
with(LinearAlgebra):
RandomMatrix(2);
Maplets
Some routines in the LinearAlgebra package come with Maplet interfaces. To see the available interfaces, see the Maplets:-Examples:-LinearAlgebra help page.
Task
Some routines in the LinearAlgebra package come with a task template to step you through the process of solving a linear algebra problem. For more information, see the Using Tasks help page.
Student:-LinearAlgebra Package
For students learning the concepts presented in an introductory linear algebra course, see the Student:-LinearAlgebra help page.
Basis
return a basis for a vector space
CharacteristicPolynomial
construct the characteristic polynomial of a Matrix
CrossProduct
compute the cross product of two Vectors
DeleteRow
delete rows of a Matrix
Determinant
compute the determinant of a Matrix
Dimension
determine the dimension of a Matrix or a Vector
DotProduct
compute the dot product of two Vectors
Eigenvalues
compute the eigenvalues of a Matrix
Eigenvectors
compute the eigenvectors of a Matrix
GaussianElimination
perform Gaussian elimination on a Matrix
LeastSquares
compute the least squares solutions to equations
LinearSolve
solve the linear equations A . x = b
Map
map a procedure onto an expression
MatrixInverse
compute the inverse of a square Matrix
MatrixScalarMultiply
compute the product of a Matrix and a scalar
NullSpace
compute a basis for the nullspace of a Matrix
RandomMatrix
construct a random Matrix
ReducedRowEchelonForm
perform Gauss-Jordan elimination on a Matrix
SubMatrix
construct a submatrix of a Matrix
Transpose
compute the transpose of a Matrix
with⁡LinearAlgebra:
Construct a 5 x 5 Matrix.
M≔RandomMatrix⁡5
M≔−81−98−76−429−38−77−722744−1857−28928727−3269−3133−93−749967
Construct a submatrix of the Matrix M, where the first list in the calling sequence selects corresponding row entries and the second list selects column entries.
SubMatrix⁡M,2..5,2..3,1
−77−72−3857−2−1827−3287−93−7433
Construct the Sylvester Matrix of two polynomials.
SylvesterMatrix⁡x2+3⁢x,2⁢x
130200020
Compute the Eigenvectors of a Matrix.
Eigenvectors⁡Matrix⁡4,−1,6,2,1,6,2,−1,8
922,1−312101110
Test if the Matrix M is orthogonal.
M≔Matrix⁡sqrt⁡10⋅310,−sqrt⁡1010,sqrt⁡1010,sqrt⁡10⋅310
M≔3⁢1010−101010103⁢1010
IsOrthogonal⁡M
true
Solve the system defined by Matrix M and Vector v.
M≔Matrix⁡1,1,3,−1,1,1,1,1,1,−2,1,−1,4,1,8,−1
M≔113−111111−21−1418−1
v≔Vector⁡0,1,1,0
v≔0110
LinearSolve⁡M,v
25643−52−2
Construction of simple Matrices and Vectors, extraction of submatrices, transposition, basic arithmetic and computation of inner products can be done directly without use of commands in the LinearAlgebra package.
u≔Vector⁡1,3
u≔13
v≔Vector⁡5,7
v≔57
u+v
610
u·v
26
A≔Matrix⁡1,3,5,7
A≔1357
B≔Matrix⁡1,1,1,1
B≔1111
A+2⁢B
3579
A·B
441212
A·u
1026
A−1
−783858−18
A%T
1537
For more information including:
a complete list of the routines in the LinearAlgebra package
the supported data structures and data types
the different sets of commands based on usage scenario: casual use or programming use
the LinearAlgebra:-Modular subpackage for performing dense linear algebra computations in Z/m.
the LinearAlgebra:-Generic subpackage for computing with generic implementations of algorithms for linear algebra over fields, Euclidean domains, integral domains and rings.
see the Details of the LinearAlgebra Package help page.
Applications
Bivariate Polynomial Regression
See Also
examples/LA_Syntax_Shortcuts
LAIndex
VectorCalculus
Download Help Document