Detailed instructions for use are in the User's Guide.
[. . . ] Maple User Manual
Copyright © Maplesoft, a division of Waterloo Maple Inc. 2005.
Maple User Manual
Copyright
Maplesoft, Maple, Maple Application Center, Maple Student Center, Maplet, Maple T. A. , and MapleNet are all trademarks of Waterloo Maple Inc. No part of this book may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means -- electronic, mechanical, photocopying, recording, or otherwise. Information in this document is subject to change without notice and does not represent a commitment on the part of the vendor. [. . . ] > . )
·
Table 4. 6: Matrix and Vector Arithmetic Operators
Operation Addition Operator Example
>
Subtraction
>
4. 3 Linear Algebra · 147
Operation Multiplication Operator . Example
>
Scalar Multiplication1
*
>
>
Exponentiation2
^
>
>
1
You can specify scalar multiplication explicitly by entering *, which displays in 2-D Math as . In 2-D Math, you can also implicitly multiply a scalar and a matrix or vector by placing a space character between them. For example, Maple interprets a number followed by a name as an implicit multiplication.
2
In 2-D Math, exponents display as superscripts.
A few additional matrix and vector operators are listed in Table 4. 7.
148 · 4 Mathematical Computations Define two column vectors. >
Table 4. 7: Select Matrix and Vector Operators
Operation Transpose Operator ^%T1 Example
>
Hermitian Transpose
^%H1
>
Cross Product (3-D vectors only)
&x2
> >
1 2
Exponential operators display in 2-D Math as superscripts.
After loading the LinearAlgebra package, the cross product operator is available as the infix operator &x . Otherwise, it is available as the LinearAlgebra[CrossProduct] command.
For information on matrix arithmetic over finite rings and fields, refer to the ?mod help page. Point-and-Click Interaction Using context menus, you can perform many matrix and vector operations.
4. 3 Linear Algebra · 149 Matrix operations available in the context menu include the following. · · · · · Standard operations: determinant, inverse, norm (1, Euclidean, infinity, or Frobenius), transpose, and trace Compute eigenvalues, eigenvectors, and singular values Compute the dimension or rank Convert to the Jordan form, or other forms Perform Cholesky decomposition and other decompositions
For example, compute the infinity norm of a matrix. See Figure 4. 5.
Figure 4. 5: Computing the Infinity Norm of a Matrix
In Document mode, Maple inserts a right arrow followed by the norm. See Figure 4. 6.
150 · 4 Mathematical Computations
Figure 4. 6: Computing Norm in Document Mode
Vector operations available in the context menu include the following. · · · · Compute the dimension Compute the norm (1, Euclidean, and infinity) Compute the transpose Select an element
For more information on context menus, see Context Menus (page 20) (for Document mode) or Context Menus (page 46) (for Worksheet mode). LinearAlgebra Package Commands The LinearAlgebra package contains commands that construct and manipulate matrices and vectors, compute standard operations, perform queries, and solve linear algebra problems. For a complete list, refer to the ?LinearAlgebra/Details help page.
Table 4. 8: Select LinearAlgebra Package Commands
Command Basis CrossProduct DeleteRow Dimension Eigenvectors FrobeniusForm Description Return a basis for a vector space Compute the cross product of two vectors Delete the rows of a matrix Determine the dimension of a matrix or a vector Compute the eigenvalues and eigenvectors of a matrix Reduce a matrix to Frobenius form
4. 3 Linear Algebra · 151
Command Description
GaussianElimination Perform Gaussian elimination on a matrix HessenbergForm HilbertMatrix IsOrthogonal LeastSquares LinearSolve MatrixInverse QRDecomposition RandomMatrix SylvesterMatrix Reduce a square matrix to Hessenberg form Construct a generalized Hilbert matrix Test if a matrix is orthogonal Compute the least-squares approximation to A . x = b Compute the inverse of a square matrix or pseudo-inverse of a nonsquare matrix Compute a QR factorization of a matrix Construct a random matrix Construct the Sylvester matrix of two polynomials
For information on arithmetic operations, see Matrix Arithmetic (page 146). For information on selecting entries, subvectors, and submatrices, see Accessing Entries in Matrices and Vectors (page 144). Example Determine a basis for the space spanned by the set of vectors {(2, 13, -15), (7, -2, 13), (5, -4, 9)}. > > Find a basis for the vector space spanned by these vectors, and then construct a matrix from the basis vectors. >
152 · 4 Mathematical Computations
To express (25, -4, 9) in this basis, use the LinearSolve command. >
Numeric Computations You can very efficiently perform computations on large matrices and vectors that contain floating-point data using the built-in library of numeric linear algebra routines. Some of these routines are provided by the Numerical Algorithms Group (NAG®). Maple also contains portions of the CLAPACK and optimized ATLAS libraries. For information on performing efficient numeric computations using the LinearAlgebra package, refer to the ?EfficientLinearAlgebra help page. [. . . ] For details on Code Generation, refer to the ?CodeGeneration help page.
Accessing External Products from Maple
External Calling External calling allows you to use compiled C, Fortran77, or Java code in Maple. Functions written in these languages can be linked and used as if they were Maple procedures. With external calling you can use pre-written optimized algorithms without the need to translate them into Maple commands. Access to the NAG library routines and other numerical algorithms is built into Maple using the external calling mechanism. [. . . ]