rank(A) As in Mathcad
The rank of a matrix: how many of its rows are independent.
It is found by row reduction (see rref), counting the nonzero rows. Values near zero count as zero.
Help › Functions
rank det norm1 norm2 norme normi cond1 cond2 conde condi eigenvals eigenvec eigenvecs cholesky lu qr svd svds geninv lsolve rref
rank(A) As in MathcadThe rank of a matrix: how many of its rows are independent.
It is found by row reduction (see rref), counting the nonzero rows. Values near zero count as zero.
det(A) As in MathcadThe determinant of a square matrix.
A determinant of 0 means the matrix has no inverse.
The result has the matrix's units raised to the number of rows.
norm1(A) As in MathcadThe L1 norm of a matrix: its largest column sum of absolute values.
See normi for the largest row sum, norm2 for the spectral norm and norme for the Euclidean norm.
norm2(A) As in MathcadThe L2 (spectral) norm of a matrix: its largest singular value.
See svds for all the singular values.
norme(A) As in MathcadThe Euclidean (Frobenius) norm of a matrix or vector: the square root of the sum of the squares of all its elements.
normi(A) As in MathcadThe infinity norm of a matrix: its largest row sum of absolute values.
See norm1 for the largest column sum.
cond1(A) As in MathcadThe condition number of a square matrix in the L1 norm: norm1(A)·norm1(A⁻¹).
A large number means that solving with the matrix magnifies errors. The smallest possible value is 1.
cond2(A) As in MathcadThe condition number of a matrix in the L2 norm: the largest singular value over the smallest.
See cond1 for what the number means.
conde(A) As in MathcadThe condition number of a square matrix in the Euclidean norm: norme(A)·norme(A⁻¹).
See cond1 for what the number means.
condi(A) As in MathcadThe condition number of a square matrix in the infinity norm: normi(A)·normi(A⁻¹).
See cond1 for what the number means.
eigenvals(A) As in MathcadA column vector of the eigenvalues of a square matrix.
The values can be complex, as for a rotation. eigenvecs gives the matching eigenvectors.
eigenvec(A, z) As in MathcadThe unit-length eigenvector of A for the eigenvalue z.
z must be an eigenvalue of A, as eigenvals gives. A real vector comes back with its first nonzero element positive.
eigenvecs(A) As in MathcadA matrix whose columns are the unit-length eigenvectors of A, in the order eigenvals lists the values.
Each real vector is signed so its first nonzero element is negative, so a column can differ in sign from eigenvec. A repeated eigenvalue gets independent vectors.
cholesky(A) As in MathcadThe lower-triangular matrix L with L·Lᵀ = A, for a symmetric positive definite A.
Only the lower triangle of A is read.
lu(A) As in MathcadThe LU decomposition of a square matrix: the matrices P, L and U side by side, with P·A = L·U.
P is a permutation matrix (rows swapped for stability), L is lower triangular with ones on its diagonal and U is upper triangular. They come back as one matrix three times as wide as A. Pick each out with submatrix.
qr(A) As in MathcadThe QR decomposition: the orthogonal Q and the upper-triangular R side by side, with A = Q·R.
For an m by n matrix, Q is m by m and R is m by n, joined into one m by (m+n) matrix. The diagonal of R is not negative. Pick each out with submatrix.
svd(A) As in MathcadThe singular value decomposition of A: the matrices U and V stacked one above the other, with A = U·diag(s)·Vᵀ.
For an m by n matrix, U is m by n and V is n by n, so the result has m+n rows. The values s are in descending order and come from svds. Each column of U has a positive first nonzero element.
svds(A) As in MathcadA column vector of the singular values of A, largest first.
The largest is norm2 and the ratio of largest to smallest is cond2. svd gives the vectors too.
geninv(A) As in MathcadThe generalized (pseudo) inverse of A: the matrix that, multiplied on the left, gives the identity for a tall matrix of full column rank.
Useful for a least-squares fit, where geninv(A)·b is the best solution of A·x = b.
The result has the matrix's units to the power −1.
lsolve(A, b) As in MathcadThe vector x that solves the linear system A·x = b.
A must be square and b a column vector with as many rows. For an over-determined fit use geninv.
The result has b's units divided by A's.
rref(A) As in MathcadThe reduced row echelon form of A, found by Gauss-Jordan elimination.
Append the right-hand side with augment to solve a system by hand. rank counts the nonzero rows.