Mathematica Asked by furkan on March 21, 2021
I want to find the inverse of the matrix using a unit matrix. I know it’s done directly using Inverse, but I need to write a simple code. I can’t write because I’m just starting to learn. How can I write this?
Probably not what you are asking for but RowReduce
performs the Gauss-Jordan elimination.
A = RandomReal[{-1, 1}, {1, 1} 3];
Ainv = RowReduce[
Join[A, IdentityMatrix[Length[A]], 2]
][[All, Length[A] + 1 ;;]];
Test:
Max[Abs[Ainv - Inverse[A]]]
1.11022*10^-16
Answered by Henrik Schumacher on March 21, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP