You can multiply a matrix #A# by a matrix #B# if a row of #A# is as long as a column of #B#
To find the 1,1 element, for example, of the product matrix #AB#, we have to take the first row of #A#, and the first column of #B#, multiply them term by term and finally add up.
This goes for all the terms - to find the #i,j#-th element of #AB#, we need to do this with the #i#-th row of #A# and the #j#-th column of #B#.
In this example the matrices are
#A = [(4,-3),(-3,1)],qquadqquad B = [(-1/5, -3/5),(-3/5,-4/5)]#
So, to find the 1,1 th element of #AB# we need to take
- the first row of #A# : #((4,-3))#, and
- the first column of #B# : #((-1/5),(-3/5)) #
and form the sum
#4 times (-1/5)+(-3) times (-3/5)=(-4+9)/5=1#
So, the 1,1 element of #AB# in this case is 1.
Similarly, we can find the 1,2 element to be
#4 times (-3/5)+(-3) times (-4/5)=(-12+12)/5=0#
Proceeding in this way, we can find the other elements, leading to
#AB = [[1,0],[0,1]]#
A similar calculation works for #BA# (this time you have to take rows from #B# and columns from #A#), and the result is
#BA = [[1,0],[0,1]]#
So, both #AB# and #BA# are equal to the #2 times 2# identity matrix and so, #B# is inverse to #A#.