matrix
matrix operations and manipulation
Description
Examples
Important: The matrix command has been deprecated. Use the superseding command Matrix instead. For additional information on migrating linalg code to the new packages, see LinearAlgebraMigration.
Note: The online documentation in Maple uses the convention that matrix (lowercase "m") refers to an array-based matrix used by routines in the linalg package, and Matrix (uppercase "M") refers to an rtable-based Matrix used by routines in the LinearAlgebra package. See LA_general for more information about linear algebra computations in Maple.
A matrix in Maple is represented as a two dimensional array with row and column indices indexed from 1.
Matrices can be input either directly, as a two dimensional array, or using the matrix command in the linear algebra package. For example, array(1..m,1..n) creates an empty m by n matrix. See array and linalg[matrix] for further details.
The i, j^th entry of the matrix A is accessed, and assigned to, using the subscript notation Ai,j. For example, Ai,j≔1Bi,j assigns the i, jth entry of the matrix A to be the inverse of the i, j^th entry of the matrix B.
The linalg (linear algebra) package includes many matrix operations. See linalg for further information.
The evalm function performs arithmetic on matrices. See evalm for further information.
The map function can be used to apply a function to each entry of a matrix. For example, map(simplify, A) simplifies each entry of the matrix A and map(diff, A, x) differentiates each entry of the vector A with respect to x. See map for further details.
The following indexing functions are available for matrix input: antisymmetric, diagonal, identity, sparse, and symmetric. For example, array(1..10,1..10,identity) creates a 10 by 10 identity matrix.
The linalg package has a number of special matrices. For example, bezout, fibonacci, hilbert, jacobian, sylvester, toeplitz, vandermonde etc. See the linalg package for further details.
See type/matrix for testing for a matrix. For example, type(A, 'matrix(integer)') tests for a matrix of integers.
Important: The matrix command has been deprecated. Use the superseding command Matrix instead.
linalgmatrix⁡2,3,x,y,z,a,b,c
xyzabc
array⁡1..2,1..2,1,2,3,4
1234
type⁡,matrix
true
array⁡0..1,0..1,a,b,c,d
array⁡0..1,0..1,0,0=a,0,1=b,1,0=c,1,1=d
false
A≔linalgmatrix⁡2,2,sin⁡x,x2+x+3,exp⁡x,cos⁡x2
A≔sin⁡xx2+x+3ⅇxcos⁡x2
map⁡diff,A,x
cos⁡x2⁢x+1ⅇx−2⁢x⁢sin⁡x2
See Also
Array
array(deprecated)
evalm(deprecated)
linalg(deprecated)
linalg(deprecated)[matrix]
map
Matrix
print
type
type/matrix
Vector
vector(deprecated)
Download Help Document