2
$\begingroup$

I want to invert a matrix, {{a,b},{c,d}}, where a,b,c,d are elements of a non-commutative field (for example invertible matrices). However when I use the function Inverse, it outputs elements as $\dfrac{d}{da-bc}$, while I actually need $(da-bc)^{-1} d$.

Is there a way to specify in Mathematica that a,b,c,d should be treated as elements of a non-commutative field?

$\endgroup$
  • $\begingroup$ I think you'll have to write your own NoncommutativeInverse function. $\endgroup$ – QuantumDot Sep 22 '16 at 12:34
4
$\begingroup$

The package NCAlgebra does exactly what you are looking for.

Example:

NCInverse[{{a, b}, {c, d}}] // MatrixForm

Result matrix

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.