Matrix Division Of Square Matrices Using the Inverse
Matrix Division is always gently brushed over at school with only the special case of a 2 by 2 square matrix being solved using the inverse of the square matrix. For:
With AInv, the Inverse Matrix of A is defined as:
Substituting in the numbers:
In Octave/MATLAB to find the Inv Matrix we can use the function
:
Now when a Matrix is multiplied by it's inverse will give the Identity matrix I:
If we multiply the expression
throughout by the inverse of A:
When a Matrix is multiplied by the Identity Matrix it is unchanged
Therefore:
This gives the correct value of B.
This can be thought of as:
A(1,1)*B(1,2)+A(1,2)*B(2,2)=C(1,2)
A(2,1)*B(1,1)+A(2,2)*B(2,1)=C(2,1)
A(2,1)*B(1,2)+A(2,2)*B(2,2)=C(2,2)
Assuming we don't know the values of B, but we know the values of A and C. This is 4 sets of equations, containing 4 unknowns:

B(1,1)+2*B(2,1)=19

B(1,2)+2*B(2,2)=22

3*B(1,1)+4*B(2,1)=43

3*B(1,2)+4*B(2,2)=50
Rearranging 1:
B(1,1)=192*B(2,1)
Substituting into 3:
576*B(2,1)+4*B(2,1)=43
2*B(2,1)=4357
2*B(2,1)=14
B(2,1)=14/2
B(2,1)=7
Substituting this into 1 (which was rearranged):
Now rearranging 2:
Now substituting into 4:
Substituting this into the rearranged 2:
This gives:
As expected.
Matrix Division
MATLAB can perform Matrix Division. Let's look at the case:
Because A*Bâ‰ B*A the notation to solve for A given B and C, or B given A and C is distinct.
Right division is used to calculate A given B and C:
It is useful to think of this in terms of the square matrices given above where
With the inverse being on the right hand side (multiplied throughout so it is beside B) so right division is used.
Left division is used to calculate B given A and C:
It is likewise useful to think of this as
with the inverse being on the left hand side (multiplied throughout so in is beside A) so left division is used.
Thinking of the left and right divisions in terms of where you would put the inverse helps you put the variables and the left or right division sign in the correct place.
We can use the data we multiplied together to work back from to illustrate division:
Assuming we know S and A and want to calculate E: