### The Maxima on-line user's manual

Algebra Calculator

#### Invert

Function: invert (<M>) Returns the inverse of the matrix <M>. The inverse is computed by the adjoint method.

This allows a user to compute the inverse of a matrix with bfloat entries or polynomials with floating pt. coefficients without converting to cre-form.

Cofactors are computed by the `determinant` function, so if `ratmx` is `false` the inverse is computed without changing the representation of the elements.

The current implementation is inefficient for matrices of high order.

When `detout` is `true`, the determinant is factored out of the inverse.

The elements of the inverse are not automatically expanded. If <M> has polynomial elements, better appearing output can be generated by `expand (invert (m)), detout`. If it is desirable to then divide through by the determinant this can be accomplished by

`     `xthru (%)` or alternatively from scratch by`

expand (adjoint (m)) / expand (determinant (m)) invert (m) := adjoint (m) / determinant (m)

See `^^` (noncommutative exponent) for another method of inverting a matrix.

There are also some inexact matches for `invert`. Try `?? invert` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

v1:[1156,19];

v2:[-203,8];

n:matrix(v1,v2);

Calculate

##### invert-matrix

A:matrix([5,-3], ...

invert(A).b;

Calculate

##### invert-jacobian-matrix-sin-tex-transpose

f: [sin(v1), v2];

j: invert(jacobian(f,...

v: transpose(matrix(f));

Calculate

##### invert-matrix

M: matrix([2,1,4,8],[...

24*invert(M);

Calculate

##### invert-matrix

BaseA:matrix([1, 1, ...

PermX:matrix([0, 1, 0...

InvBaseA:invert(Bas...

Calculate

##### invert-matrix-sqrt-transpose

m:matrix([3,-1,0],[-1...

invert(m);

l:matrix([sqrt(3),0,0...

Calculate

##### invert-matrix-solve

a: matrix([2, -1, 0],...

b: matrix([2, 3, -4],...

x: matrix([c, d, e], ...

Calculate

##### invert-matrix

A:matrix([1,-1,3],[0,...

B:matrix([2,1,0],[0,-...

invert(A);

Calculate

##### invert-matrix-transpose

A:matrix([120,0,-60],...

B:transpose([400,-200...

invert(A);

Calculate

##### invert

M:matrix[[2,0],[0,0.5]];

invert(M);

invert(M).matrix[[6],...

Calculate