10.9. Linear Algebra

AuxilliaryUnitMatrix
AuxilliaryUnitMatrix (n)

Get the auxilliary unit matrix of size n

BilinearForm
BilinearForm (v,A,w)

Evaluate (v,w) with respect to the bilinear form given by the matrix A

BilinearFormFunction
BilinearFormFunction (A)

Return a function that evaluates two vectors with respect to the bilinear form given by A

CharacteristicPolynomial
CharacteristicPolynomial (M)

Aliases: CharPoly

Get the characteristic polynomial as a vector

CharacteristicPolynomialFunction
CharacteristicPolynomialFunction (M)

Get the characteristic polynomial as a function

ColumnSpace
ColumnSpace (M)

Get a basis matrix for the columnspace of a matrix

CommutationMatrix
CommutationMatrix (m, n)

Return the commutation matrix K(m,n) which is the unique m*n by m*n matrix such that K(m,n) * MakeVector(A) = MakeVector(A.') for all m by n matrices A.

CompanionMatrix
CompanionMatrix (p)

Companion matrix of a polynomial (as vector)

ConjugateTranspose
ConjugateTranspose (M)

Conjugate transpose of a matrix (adjoint). This is the same as the ' operator.

See Planetmath for more information.

Convolution
Convolution (a,b)

Aliases: convol

Calculate convolution of two horizontal vectors

ConvolutionVector
ConvolutionVector (a,b)

Calculate convolution of two horizontal vectors

CrossProduct
CrossProduct (v,w)

CrossProduct of two vectors in R^3

DeterminantalDivisorsInteger
DeterminantalDivisorsInteger (M)

Get the determinantal divisors of an integer matrix (not its characteristic)

DirectSum
DirectSum (M,N...)

Direct sum of matrices

DirectSumMatrixVector
DirectSumMatrixVector (v)

Direct sum of a vector of matrices

Eigenvalues
Eigenvalues (M)

Aliases: eig

Get the eigenvalues of a matrix (Currently only for 2x2 and triangular matrices)

GramSchmidt
GramSchmidt (v,B...)

Apply the Gram-Schmidt process (to the columns) with respect to inner product given by B. If B is not given then the standard hermitian product is used. B can either be a sesquilinear function of two arguments or it can be a matrix giving a sesquilinear form. The vectors will be made orthonormal with respect to B.

See Planetmath for more information.

HankelMatrix
HankelMatrix (c,r)

Hankel matrix

HilbertMatrix
HilbertMatrix (n)

Hilbert matrix of order n.

See Planetmath for more information.

Image
Image (T)

Get the image (columnspace) of a linear transform

InfNorm
InfNorm (v)

Get the Inf Norm of a vector, sometimes called the sup norm or the max norm.

InvariantFactorsInteger
InvariantFactorsInteger (M)

Get the invariant factors of a square integer matrix (not its characteristic)

InverseHilbertMatrix
InverseHilbertMatrix (n)

Inverse Hilbert matrix of order n.

See Planetmath for more information.

IsHermitian
IsHermitian (M)

Is a matrix hermitian. That is, is it equal to its conjugate transpose.

See Planetmath for more information.

IsInSubspace
IsInSubspace (v,W)

Test if a vector is in a subspace

IsInvertible
IsInvertible (n)

Is a matrix (or number) invertible (Integer matrix is invertible iff it's invertible over the integers)

IsInvertibleField
IsInvertibleField (n)

Is a matrix (or number) invertible over a field

IsNormal
IsNormal (M)

Is a matrix normal

IsSkewHermitian
IsSkewHermitian (M)

Is a matrix skew-hermitian. That is, is the conjugate transpose equal to negative of the matrix.

See Planetmath for more information.

IsUnitary
IsUnitary (M)

Is a matrix unitary

JordanBlock
JordanBlock (n,lambda)

Aliases: J

Get the jordan block corresponding to lambda and n

Kernel
Kernel (T)

Get the kernel (nullspace) of a linear transform.

(See NullSpace)

LUDecomposition
LUDecomposition (A, L, U)

Get the LU decomposition of A and store the result in the L and U which should be references. It returns true if successful. For example suppose that A is a square matrix, then after running:

genius> LUDecomposition(A,&L,&U)
You will have the lower matrix stored in a variable called L and the upper matrix in a variable called U.

This is the LU decomposition of a matrix aka Crout and/or Cholesky reduction. (ISBN 0-201-11577-8 pp.99-103) The upper triangular matrix features a diagonal of values 1 (one). This is not Doolittle's Method which features the 1's diagonal on the lower matrix.

Not all matrices have LU decompositions, for example [0,1;1,0] does not and this function returns false in this case and sets L and U to null.

See Planetmath or Mathworld for more information.

Minor
Minor (M,i,j)

Get the i-j minor of a matrix.

See Planetmath for more information.

NonPivotColumns
NonPivotColumns (M)

Return the columns that are not the pivot columns of a matrix

Norm
Norm (v,p...)

Aliases: norm

Get the p Norm (or 2 Norm if no p is supplied) of a vector

NullSpace
NullSpace (T)

Get the nullspace of a matrix. That is the kernel of the linear mapping that the matrix represents. This is returned as a matrix whose column space is the nullspace of T.

See Planetmath for more information.

Nullity
Nullity (M)

Aliases: nullity

Get the nullity of a matrix.

See Planetmath for more information.

OrthogonalComplement
OrthogonalComplement (M)

Get the orthogonal complement of the columnspace

PivotColumns
PivotColumns (M)

Return pivot columns of a matrix, that is columns which have a leading 1 in rref form, also returns the row where they occur

Projection
Projection (v,W,B...)

Projection of vector v onto subspace W with respect to inner product given by B. If B is not given then the standard hermitian product is used. B can either be a sesquilinear function of two arguments or it can be a matrix giving a sesquilinear form.

QRDecomposition
QRDecomposition (A, Q)

Get the QR decomposition of a square matrix A, returns the upper triangular matrix R and sets Q to the orthogonal (unitary) matrix. Q should be a reference or null if you don't want any return. For example:

genius> R = QRDecomposition(A,&Q)
You will have the upper triangular matrix stored in a variable called R and the orthogonal (unitary) matrix stored in Q.

See Planetmath or Mathworld for more information.

RaleighQuotient
RaleighQuotient (A,x)

Return the Raleigh Quotient of a matrix and a vector

Rank
Rank (M)

Aliases: rank

Get the rank of a matrix.

See Planetmath for more information.

RosserMatrix
RosserMatrix ()

Rosser matrix, a classic symmetric eigenvalue test problem

Rotation2D
Rotation2D (angle)

Aliases: RotationMatrix

Rotation around origin in R^2

Rotation3DX
Rotation3DX (angle)

Rotation around origin in R^3 about the x-axis

Rotation3DY
Rotation3DY (angle)

Rotation around origin in R^3 about the y-axis

Rotation3DZ
Rotation3DZ (angle)

Rotation around origin in R^3 about the z-axis

RowSpace
RowSpace (M)

Get a basis matrix for the rowspace of a matrix

SesquilinearForm
SesquilinearForm (v,A,w)

Evaluate (v,w) with respect to the sesquilinear form given by the matrix A

SesquilinearFormFunction
SesquilinearFormFunction (A)

Return a function that evaluates two vectors with respect to the sesquilinear form given by A

SmithNormalFormField
SmithNormalFormField (A)

Smith Normal Form for fields (will end up with 1's on the diagonal)

SmithNormalFormInteger
SmithNormalFormInteger (M)

Smith Normal Form for square integer matrices (not its characteristic)

SolveLinearSystem
SolveLinearSystem (M,V,args...)

Solve linear system Mx=V, return solution V if there is a unique solution, null otherwise. Extra two reference parameters can optionally be used to get the reduced M and V.

ToeplitzMatrix
ToeplitzMatrix (c, r...)

Return the Toeplitz matrix constructed given the first column c and (optionally) the first row r. If only the column c is given then it is conjugated and the nonconjugated version is used for the first row to give a Hermitian matrix (if the first element is real of course).

See Planetmath for more information.

Trace
Trace (m)

Aliases: trace

Calculate the trace of a matrix

Transpose
Transpose (M)

Transpose of a matrix. This is the same as the .' operator.

See Planetmath for more information.

VandermondeMatrix
VandermondeMatrix (v)

Aliases: vander

Return the Vandermonde matrix

VectorAngle
VectorAngle (v,w,B...)

The angle of two vectors with respect to inner product given by B. If B is not given then the standard hermitian product is used. B can either be a sesquilinear function of two arguments or it can be a matrix giving a sesquilinear form.

VectorSpaceDirectSum
VectorSpaceDirectSum (M,N)

The direct sum of the vector spaces M and N

VectorSubspaceIntersection
VectorSubspaceIntersection (M,N)

Intersection of the subspaces given by M and N

VectorSubspaceSum
VectorSubspaceSum (M,N)

The sum of the vector spaces M and N, that is {w | w=m+n, m in M, n in N}

adj
adj (m)

Aliases: Adjugate

Get the classical adjoint (adjugate) of a matrix

cref
cref (M)

Aliases: CREF ColumnReducedEchelonForm

Compute the Column Reduced Echelon Form

det
det (M)

Aliases: Determinant

Get the determinant of a matrix.

See Planetmath for more information.

ref
ref (M)

Aliases: REF RowEchelonForm

Get the row echelon form of a matrix.

See Planetmath for more information.

rref
rref (M)

Aliases: RREF ReducedRowEchelonForm

Get the reduced row echelon form of a matrix.

See Planetmath for more information.