Solveeit Logo

Question

Question: How do I solve a system of 2 equations using a matrix?...

How do I solve a system of 2 equations using a matrix?

Explanation

Solution

For this question, we have to find a method to solve a system of 2 equations using a matrix. A matrix is a set of numbers arranged in rows and columns so as to form a rectangular array. We need to represent the equations as a set of two matrices, one for the coefficients and one for the variables and equate it to another matrix for the constants. We then use the concept of inverse matrices to solve this and we get the desired solution.

Complete step-by-step answer:
As per the given question, we have to solve a system of 2 equations using a matrix. This can be done by using what is known as the matrix equation method. In this method, we represent the entire set of equations as matrices. We usually need 3 matrices, one for the coefficients, one for the variables whose values determine the solution and one for the constants.
This matrix equation is represented as follows.
A.x=B(1)A.x=B\ldots \ldots \left( 1 \right)
Where AA represents the coefficient matrix, xx represents the variable matrix and BB represents the constant matrix.
Let us take an example to understand this better. Let us consider the two set of equations as 8x+9y=38x+9y=3 and x+y=0.x+y=0.
We can represent these equations in the form of equation (1) as shown.
[89 11 ].[x y ]=[3 0 ](2)\left[ \begin{matrix} 8 & 9 \\\ 1 & 1 \\\ \end{matrix} \right].\left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} 3 \\\ 0 \\\ \end{matrix} \right]\ldots \ldots \left( 2 \right)
Here, the first matrix AA represents the coefficient matrix, the second matrix xx represents the variable matrix and the third matrix BB represents the constant matrix.
We now need to find inverse of matrix AA to multiply both sides of the equation with it.
We know the formula to find the inverse of a matrix AA is given as,
If A=[ab cd ], then A1=1adbc[db ca ]\text{If }A=\left[ \begin{matrix} a & b \\\ c & d \\\ \end{matrix} \right],\text{ then }{{A}^{-1}}=\dfrac{1}{ad-bc}\left[ \begin{matrix} d & -b \\\ -c & a \\\ \end{matrix} \right]
Using this equation and substituting the values,
A1=18×19×1[19 18 ]\Rightarrow {{A}^{-1}}=\dfrac{1}{8\times 1-9\times 1}\left[ \begin{matrix} 1 & -9 \\\ -1 & 8 \\\ \end{matrix} \right]
A1=189[19 18 ]\Rightarrow {{A}^{-1}}=\dfrac{1}{8-9}\left[ \begin{matrix} 1 & -9 \\\ -1 & 8 \\\ \end{matrix} \right]
Subtracting 8 and 9 and then multiplying each term of the matrix with this value of -1,
A1=1[19 18 ]\Rightarrow {{A}^{-1}}=-1\left[ \begin{matrix} 1 & -9 \\\ -1 & 8 \\\ \end{matrix} \right]
A1=[19 18 ]\Rightarrow {{A}^{-1}}=\left[ \begin{matrix} -1 & 9 \\\ 1 & -8 \\\ \end{matrix} \right]
We now multiply both sides of the equation (2) by A1.{{A}^{-1}}.
[19 18 ][89 11 ].[x y ]=[19 18 ][3 0 ]\Rightarrow \left[ \begin{matrix} -1 & 9 \\\ 1 & -8 \\\ \end{matrix} \right]\left[ \begin{matrix} 8 & 9 \\\ 1 & 1 \\\ \end{matrix} \right].\left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} -1 & 9 \\\ 1 & -8 \\\ \end{matrix} \right]\left[ \begin{matrix} 3 \\\ 0 \\\ \end{matrix} \right]
This is of the form A1.A.x=A1.B.{{A}^{-1}}.A.x={{A}^{-1}}.B. We know that A1.A=I.{{A}^{-1}}.A=I. Where II represents a 2 by 2 identity matrix of the form,
I=[11 11 ]I=\left[ \begin{matrix} 1 & 1 \\\ 1 & 1 \\\ \end{matrix} \right]
Now the equation is simplified to,
[11 11 ].[x y ]=[19 18 ][3 0 ]\Rightarrow \left[ \begin{matrix} 1 & 1 \\\ 1 & 1 \\\ \end{matrix} \right].\left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} -1 & 9 \\\ 1 & -8 \\\ \end{matrix} \right]\left[ \begin{matrix} 3 \\\ 0 \\\ \end{matrix} \right]
We also know that any matrix multiplied by this identity matrix is equal to the matrix itself.
I.x=x\Rightarrow I.x=x
Therefore, we can see the equation now taking the form:
[x y ]=[19 18 ][3 0 ]\Rightarrow \left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} -1 & 9 \\\ 1 & -8 \\\ \end{matrix} \right]\left[ \begin{matrix} 3 \\\ 0 \\\ \end{matrix} \right]
We now need to perform the matrix multiplication on the RHS.
Matrix multiplication can be done only if the number of columns of the first matrix equals the number of rows of the second matrix. In this case, the number of columns of the first matrix equals the number of rows of the second matrix which are both 2.
To perform matrix multiplication, we multiply the first row of the first matrix by the column of the second matrix. Then we multiply the first row of the first matrix by the column of the second matrix and sum up all the terms.
[x y ]=[1×3+9×0 1×38×0 ]\Rightarrow \left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} -1\times 3+9\times 0 \\\ 1\times 3-8\times 0 \\\ \end{matrix} \right]
Summing up the terms, we get
[x y ]=[3 3 ]\Rightarrow \left[ \begin{matrix} x \\\ y \\\ \end{matrix} \right]=\left[ \begin{matrix} -3 \\\ 3 \\\ \end{matrix} \right]
Comparing the two matrices, we get the solution as x=3x=-3 and y=3.y=3.
Hence, we have solved a system of 2 equations using a matrix.

Note: While solving this question, the students need to be careful while doing the matrix multiplication. We can also solve this problem by using the method of augmented matrix. In this method, we change the system of equations by performing row and column operations and simplify the given equations and get the solution.