Inverse of a 3x3 Matrix [closed]

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.

• "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. – Szabolcs Mar 31 '17 at 19:05
• 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. – HattieS Mar 31 '17 at 19:12
• If you are trying to implement a specific algorithm, describe that algorithm in the question. – Szabolcs Mar 31 '17 at 19:13
• 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. – HattieS Mar 31 '17 at 19:18
• Can you do it for two by two matrices first? – bill s Mar 31 '17 at 19:29

MatrixForm[First[B /. Solve[A.B == IdentityMatrix[Length[A]]]]]

LinearSolve[A, IdentityMatrix[Dimensions[A]]]

• Technically, LinearSolve is not Inverse. But is it really any different? – Szabolcs Mar 31 '17 at 21:14