Linear Algebra Overview - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : Linear Algebra Overview

Overview of the LinearAlgebra Package

 

Basic Functionality

Interfaces to the LinearAlgebra Package

Essential LinearAlgebra Package Commands

Examples

Details

Basic Functionality

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.

Interfaces to the LinearAlgebra Package

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.

Essential LinearAlgebra Package Commands

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

Examples

withLinearAlgebra:

Construct a 5 x 5 Matrix.

MRandomMatrix5

M−81−98−76−429−38−77−722744−1857−28928727−3269−3133−93−749967

(1)

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.

SubMatrixM,2..5,2..3,1

−77−72−3857−2−1827−3287−93−7433

(2)

Construct the Sylvester Matrix of two polynomials.

SylvesterMatrixx2+3x,2x

130200020

(3)

Compute the Eigenvectors of a Matrix.

EigenvectorsMatrix4,1,6,2,1,6,2,1,8

922,1−312101110

(4)

Test if the Matrix M is orthogonal.

MMatrixsqrt10310,sqrt1010,sqrt1010,sqrt10310

M310101010101031010

(5)

IsOrthogonalM

true

(6)

Solve the system defined by Matrix M and Vector v.

MMatrix1,1,3,1,1,1,1,1,1,2,1,1,4,1,8,1

M113−111111−21−1418−1

(7)

vVector0,1,1,0

v0110

(8)

LinearSolveM,v

2564352−2

(9)

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.

uVector1,3

u13

(10)

vVector5,7

v57

(11)

u+v

610

(12)

u·v

26

(13)

AMatrix1,3,5,7

A1357

(14)

BMatrix1,1,1,1

B1111

(15)

A+2B

3579

(16)

A·B

441212

(17)

A·u

1026

(18)

A1

78385818

(19)

A%T

1537

(20)

Details

  

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