Expand #A# with an identity matrix appended to its right side:
#((0,1,2,"|",1,0,0),
(1,3,5,"|",0,1,0),
(-2,-3,-5,"|",0,0,1))#
Our objective will be to perform standard row operations which will convert this matrix into a matrix with the identity matrix on the left side
Exchanging Row 1 and Row 2
#((1,3,5,"|",0,1,0),
(0,1,2,"|",1,0,0),
(-2,-3,-5,"|",0,0,1))#
Row 3 = (#2xx# Row 1) plus Row 3
#((1,3,5,"|",0,1,0),
(0,1,2,"|",1,0,0),
(0,3,5,"|",0,2,1))#
Row 1 = Row 1 minus (#3xx# Row 2)
#((1,0,-1,"|",-3,1,0),
(0,1,2,"|",1,0,0),
(0,3,5,"|",0,2,1))#
Row 3 = (#3xx# Row 2) minus Row 3
#((1,0,-1,"|",-3,1,0),
(0,1,2,"|",1,0,0),
(0,0,1,"|",3,-2,-1))#
Row 1 = Row 1 plus Row 3
#((1,0,0,"|",0,-1,-1),
(0,1,2,"|",1,0,0),
(0,0,1,"|",3,-2,-1))#
Row 2 = Row 2 minus (#2xx# Row 3)
#((1,0,0,"|",color(green)(0),color(green)(-1),color(green)(-1)),
(0,1,0,"|",color(green)(-5),color(green)(4),color(green)(2)),
(0,0,1,"|",color(green)(3),color(green)(-2),color(green)(-1)))#
The half of the matrix on the right side is the inverse of the original matrix.
You should check this result to ensure:
#A xx A^(-1) = I#
that is
#((0,1,2),(1,3,5),(-2,-3,-5))xx((0,-1,-1),(-5,4,2),(3,-2,-1)) = ((1,0,0),(0,1,0),(0,0,1))#