Matrices and Linear Algebra

Mathematica automatically handles both numeric and symbolic matrices, seamlessly switching among large numbers of highly optimized algorithms. Using many original methods, Mathematica can handle numerical matrices of any precision, automatically invoking machine-optimized code when appropriate. Mathematica handles both dense and sparse matrices and can routinely operate on matrices with millions of entries.

ReferenceReference

Operations on Vectors »

+, *, ^, ... automatically operate element-wise: ->

Dot (.) scalar dot product

Cross ▪ Norm ▪ Total ▪ Normalize ▪ Projection ▪ Orthogonalize ▪ ...

Constructing Matrices »

Table construct a matrix from an expression

IdentityMatrix ▪ DiagonalMatrix ▪ RotationMatrix ▪ HilbertMatrix ▪ ...

Parts of Matrices »

Part a part or submatrix: ; resettable with

Dimensions ▪ Take ▪ Drop ▪ Diagonal ▪ Position ▪ UpperTriangularize ▪ ...

Matrix Operations »

Dot(.) ▪ Inverse ▪ Transpose ▪ Det ▪ Tr ▪ Eigenvalues ▪ MatrixExp ▪ ...

Linear Systems »

LinearSolve ▪ NullSpace ▪ MatrixRank ▪ RowReduce ▪ Minors ▪ ...

Minimization Problems »

LeastSquares ▪ PseudoInverse ▪ Norm ▪ LinearProgramming ▪ ...

Matrix Decompositions »

SingularValueDecomposition ▪ QRDecomposition ▪ LUDecomposition ▪ CholeskyDecomposition ▪ SchurDecomposition ▪ ...

PrincipalComponents ▪ KarhunenLoeveDecomposition ▪ ...

Matrix Tests

MatrixQ ▪ HermitianMatrixQ ▪ SymmetricMatrixQ ▪ PositiveDefiniteMatrixQ

Displaying Matrices

MatrixForm display a matrix in 2D form

MatrixPlot visualize a matrix using colors for elements

Sparse Arrays »

SparseArray construct a sparse matrix from positions and values

ArrayRules ▪ Normal ▪ CoefficientArrays ▪ ...

Data Formats

"CSV" ▪ "HDF" ▪ "MAT" ▪ "MTX" ▪ "HarwellBoeing" ▪

New to Mathematica? Find your learning path »
Have a question? Ask support »