Matrix Operations and Transformations

Operations on rows and columns, scalar and vector products, transpose, and inverse

Note

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD Functions

linalg::addColLinear combination of matrix columns
linalg::addRowLinear combination of matrix rows
linalg::colExtract columns of a matrix
linalg::delColDelete matrix columns
linalg::delRowDelete matrix rows
linalg::multColMultiply columns with a scalar
linalg::multRowMultiply rows with a scalar
linalg::rowExtract rows of a matrix
linalg::setColChange a column of a matrix
linalg::setRowChange a row of a matrix
linalg::swapColSwap two columns in a matrix
linalg::swapRowSwap two rows in a matrix
inverseInverse of a matrix
transposeTranspose of a matrix
htransposeHermitian transpose of a matrix
linalg::pseudoInverseMoore-Penrose inverse of a matrix
numeric::inverseInverse of a matrix
lllintCompute an LLL-reduced basis of a lattice
normCompute the norm of a matrix, a vector, or a polynomial
linalg::concatMatrixJoin matrices horizontally
linalg::crossProductCross product of three-dimensional vectors
linalg::kroneckerProductKronecker product of matrices
linalg::normalizeNormalize a vector
linalg::ogCoordTabTable of orthogonal coordinate transformations
linalg::scalarProductScalar product of vectors
linalg::stackMatrixJoin matrices vertically
linalg::submatrixExtract a submatrix or a subvector from a matrix or a vector, respectively
linalg::substituteReplace a part of a matrix by another matrix
linalg::sylvesterSylvester matrix of two polynomials
numeric::rotationMatrixOrthogonal matrix of the rotation about an axis

Examples and How To

Compute with Matrices

When performing basic arithmetic operations on matrices, use the standard arithmetic operators.

Invert Matrices

To find the inverse of a matrix, enter 1/A or A^(-1):

Transpose Matrices

To transpose a matrix, use the transpose command:

Swap and Delete Rows and Columns

The MuPAD linalg library provides the functions for interchanging or deleting rows and columns of a matrix.

Compute Matrix Exponentials

Compute matrix exponentials.

Concepts

Linear Algebra Library

Use only in the MuPAD Notebook Interface.

Numeric Algorithms Library

Use only in the MuPAD Notebook Interface.