1
$\begingroup$

So I know the definition of the Inverse of a Matrix A is that there exists matrix B such that AB=BA=I3, where I3 is the identity matrix. If A is invertible, then the matrix B is called the inverse of the matrix A, and it is denoted by A-1.

I'm trying to find the inverse of a random 3x3 matrix A with integer coefficient (if it exists) without using the Inverse[...] function in Mathematica. So far I have:

A=Table[RandomInteger[],{i,3},{j,3}]
B=Table[x[i,j],{i,3},{j,3}]

And would have to solve for B, such that

A.B==B.A==I

I have no idea how to start and anything would be helpful.

$\endgroup$

closed as off-topic by David G. Stork, Szabolcs, Michael E2, Daniel Lichtblau, J. M. will be back soon Apr 1 '17 at 0:35

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Daniel Lichtblau, J. M. will be back soon
  • "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – David G. Stork, Szabolcs, Michael E2
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    $\begingroup$ "without using the Inverse[...] function" and "I have no idea how to start" I think that these comments demonstrate that this is not a Mathematica question ... It is a linear algebra one. Before you can do this in Mathematica, you must become familiar with the underlying mathematics. $\endgroup$ – Szabolcs Mar 31 '17 at 19:05
  • $\begingroup$ I understand the actually Mathematics, but don't know how to start to code it for a random 3x3 matrix without finding the determinant, matrix of cofactors and then transposing. $\endgroup$ – HattieS Mar 31 '17 at 19:12
  • 1
    $\begingroup$ If you are trying to implement a specific algorithm, describe that algorithm in the question. $\endgroup$ – Szabolcs Mar 31 '17 at 19:13
  • $\begingroup$ I don't know if I meant to implement an algorithm as all I am given is that if A.B=B.A=I then B is said to be the inverse of A. $\endgroup$ – HattieS Mar 31 '17 at 19:18
  • 1
    $\begingroup$ Can you do it for two by two matrices first? $\endgroup$ – bill s Mar 31 '17 at 19:29
2
$\begingroup$
MatrixForm[First[B /. Solve[A.B == IdentityMatrix[Length[A]]]]]
$\endgroup$
2
$\begingroup$
LinearSolve[A, IdentityMatrix[Dimensions[A]]]
$\endgroup$
  • 1
    $\begingroup$ Technically, LinearSolve is not Inverse. But is it really any different? $\endgroup$ – Szabolcs Mar 31 '17 at 21:14

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