linalg(deprecated)/inverse - Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : linalg(deprecated)/inverse

linalg(deprecated)

 inverse
 compute the inverse of a matrix

 Calling Sequence inverse(A)

Parameters

 A - square matrix

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[MatrixInverse], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function inverse computes the matrix inverse of A. An error occurs if the matrix is singular.
 • This function uses Cramer's rule for matrices of dimension less than or equal to 4 by 4, and for matrices with the 'sparse' indexing function.
 • For other matrices, the inverse is computed by applying the operations for the Gauss-Jordan reduction of A to an identity matrix of the same shape.
 • The command with(linalg,inverse) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[MatrixInverse], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\mathrm{array}\left(\left[\left[1,x\right],\left[2,3\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1}& {x}\\ {2}& {3}\end{array}\right]$ (1)
 > $\mathrm{inverse}\left(A\right)$
 $\left[\begin{array}{cc}{-}\frac{{3}}{{2}{}{x}{-}{3}}& \frac{{x}}{{2}{}{x}{-}{3}}\\ \frac{{2}}{{2}{}{x}{-}{3}}& {-}\frac{{1}}{{2}{}{x}{-}{3}}\end{array}\right]$ (2)

 See Also