solve 6x+5y=13 and 3x-2y=-16 using matrices.
We can write down the equations as,
6x + 5y = 13
3x - 2y = -16
In matrix notation, the set of equations is written as,
| 6 5 | | x |= | 13 |
| 3 -2 | | y | |-16 |
or, AX = b
The solution is given by: X = A^(-1)b,
where A^(-1) is the inverse matrix of the matrix A.
For a 2 x 2 matrrix, calculating the inverse is quite simple.
If A is the matrix
| a b |
| c d |
Then the inverse, A^(-1), is given by
(1/det(A))*| d -b |, where det(A) = ad - bc (note that the a and d have been interchanged)
|-c a | ( and c and b have their signs changed)
Since we have A = | 6 5 |, with a = 6, b = 5, c = 3, d = -2, then
| 3 -2 |
det(A) = ad - bc = 6*(-2) - 5*3 = -12 - 15 = -27
det(A)=-27
A^(-1) = (-1/27)*|-2 -5 |, and X = A^(-1)b
|-3 6 |
So, X = (-1/27)*|-2 -5 || 13 | = (-1/27)|-26 + 80 | = (-1/27)| 54 | = | -2 |
|-3 6 ||-16 | |-39 - 96 | |-135 | | 5 |
So, X = | x | = | -2 |
| y | | 5 |
The solution is: x = -2, y = 5