The elimination method
There is another method, called the elimination method, that you can use to solve a system of linear equations.
Let us take the following system of equations and solve it by this method.
$\begin{align*} x+5y&=7\\ 3x-2y&=4 \end{align*}$
In the elimination method, you eliminate one of the variables by adding the two equations. First, make sure both equations are in standard form, $(ax+by=c)$. If one or both equations are not in standard form, rewrite them in standard form first. Next, make the coefficient of one variable in one equation the opposite of its coefficient in the other equation, by multiplying through by a number.
Looking at the system, both equations are already in standard form. Next, we make the coefficient of one variable in one equation the opposite of its coefficient in the other equation. To do this, first check whether the coefficients of either variable are already opposite. If not, check whether they are the same (if so, multiply one equation by $-1$). Otherwise, look for a variable with coefficient $1$. Here, the coefficient of $x$ in the first equation is $1$, and the coefficient of $x$ in the second equation is $3$, so we need a coefficient of $-3$ for $x$ in equation 1 to make them opposite. So, we multiply the first equation by $-3$:
$-3\times Eqn.1:$
$\:-3x-15y=-21 $
Now add this equation to the other equation (Eqn. 2):
$\begin{aligned} -\cancel{3x}-15y &= -21 \\ \cancel{3x}-2y &= 4\\ \\ -17y &= -17\\ \end{aligned}$
Dividing by $-17$,
$y= 1$
Now, substitute this $y$ value into one of the original equations (either one) and solve for $x$. I take equation 1 and substitute $y=1$:
$x+5\cdot 1=7$
Solving for $x$,
$x=2$
So, the solution is $(2,1)$.
Example 1: Solve the following system of equations by elimination method:
$\begin{align*} 2x+y&=7\\ 3x-y&=3 \end{align*}$
Both equations are in standard form. The $y$-terms, $+y$ and $-y$, are already opposites, so add the two equations:
$\begin{aligned} 2x+\cancel{y} &= 7\\ 3x-\cancel{y} &= 3\\ \\ 5x &= 10 \end{aligned}$
Dividing by $5$,
$x=2$
Substitute $x=2$ into the first equation:
$2(2)+y=7$
Solving for $y$,
$y=3$
So, the solution is $(2,3)$.
Example 2: Solve the following system of equations by elimination method:
$\begin{align*} 3x-2y&=8\\ x+9y&=-7 \end{align*}$
Neither the $x$-terms nor the $y$-terms are opposites. The coefficient of $x$ in the second equation is $1$, so multiply the second equation by $-3$ to make the $x$-coefficients opposite:
$-3\times Eqn.2:$
$-3x-27y=21$
Add this equation to the first equation:
$\begin{aligned} \cancel{3x}-2y &= 8\\ -\cancel{3x}-27y &= 21\\ \\ -29y &= 29 \end{aligned}$
Dividing by $-29$,
$y=-1$
Substitute $y=-1$ into the second equation:
$x+9(-1)=-7$
Solving for $x$,
$x=2$
So, the solution is $(2,-1)$.
Example 3: Solve the following system of equations by elimination method:
$\begin{align*} 0.18x-0.03y&=-0.93\\ 0.7x+1.5y&=7.7 \end{align*}$
First, clear the decimals. Multiply the first equation by $100$ and the second equation by $10$:
$\begin{align*} 18x-3y&=-93\\ 7x+15y&=77 \end{align*}$
Make the $y$-terms opposites. Multiply the first equation by $5$ so that its $y$-coefficient becomes $-15$:
$5\times Eqn.1:$
$90x-15y=-465$
Add this equation to the second equation:
$\begin{aligned} 90x-\cancel{15y} &= -465\\ 7x+\cancel{15y} &= 77\\ \\ 97x &= -388 \end{aligned}$
Dividing by $97$,
$x=-4$
Substitute $x=-4$ into $18x-3y=-93$:
$18(-4)-3y=-93$
Solving for $y$,
$\begin{align*}-72-3y&=-93\\-3y&=-21\\y&=7\end{align*}$
So, the solution is $(-4,7)$.
Note that if a system has no solution or infinitely many solutions, then when you try to eliminate one variable, both variables are eliminated, and you end up with a number on the left-hand side and another on the right-hand side. If the two numbers are the same, then the system has infinitely many solutions; if they are different, then the system has no solution.
Example 4: Solve the following system of equations by elimination method:
$\begin{align*} 6y =12-4x \\ 2x+3y = 2\\ \end{align*}$
Here, equation 1 is not in standard form, so add $4x$ to both sides to put it in standard form:
$4x+6y=12$
This equation has a common factor of $2$. Divide the equation by this common factor.
$2x+3y=4$
Now, we need to solve these equations:
$\begin{align*} 2x+3y = 4 \\ 2x+3y = 2\\ \end{align*}$
The coefficients of all the variables are the same, so we multiply one equation by $-1$. I take the first equation and multiply it by $-1$, which changes the sign of every term:
$-2x-3y=-4$
Now, add this with the second equation:
$\begin{align*} -\cancel{2x}-\cancel{3y} &=-4\\ \cancel{2x}+\cancel{3y} &= 2\\ \\ 0 &=-2 \end{align*}$
This statement is not true; therefore, the system of equations has no solution.
Example 5: Solve the system
$\begin{align*} -2x+3y &= 6 \\ 8x-12y &= -24\\ \end{align*}$
First, make sure the equations are in standard form. Yes, they are.
The second equation has a common factor of $4$. Dividing it out,
$2x-3y=-6$
Now, we have these equations to solve:
$\begin{align*} -2x+3y &= 6 \\ 2x-3y &= -6\\ \end{align*}$
Now we see that the coefficients of $x$ are opposite, and so are the coefficients of $y$. Add the two equations:
$\begin{align*} -\cancel{2x}+\cancel{3y} &= \cancel{6} \\ \cancel{2x}-\cancel{3y} &= -\cancel{6}\\ \\ 0=0 \end{align*}$
This statement is true, so the system has infinitely many solutions.
A system of equations that has infinitely many solutions is called dependent. In a dependent system, both equations are the same but written in different forms.