Matrices and Linear Algebra

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

Operations on Vectors »

+, *, ^, ... automatically operate element-wise: {a,b}+{c,d}->{a+c,b+d}

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: m[[i,j]]; resettable with m[[i,j]]=x

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  ▪  ...

Matrix Decompositions »

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

PrincipalComponents  ▪  KarhunenLoeveDecomposition  ▪  ...

Matrix Predicates »

MatrixQ  ▪  DiagonalMatrixQ  ▪  UpperTriangularMatrixQ  ▪  SymmetricMatrixQ  ▪  PositiveDefiniteMatrixQ  ▪  ...

Random Matrices »

RandomVariate  ▪  WishartMatrixDistribution  ▪  MatrixPropertyDistribution  ▪  ...

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"  ▪  "HDF5"  ▪  "HDF"  ▪  "MAT"  ▪  "MTX"  ▪  "HarwellBoeing"  ▪  ...