Skip to main content
Solve for x, y
Tick mark Image
Graph

Similar Problems from Web Search

Share

-x-3y=12,-5x-9y=18
To solve a pair of equations using substitution, first solve one of the equations for one of the variables. Then substitute the result for that variable in the other equation.
-x-3y=12
Choose one of the equations and solve it for x by isolating x on the left hand side of the equal sign.
-x=3y+12
Add 3y to both sides of the equation.
x=-\left(3y+12\right)
Divide both sides by -1.
x=-3y-12
Multiply -1 times 12+3y.
-5\left(-3y-12\right)-9y=18
Substitute -3y-12 for x in the other equation, -5x-9y=18.
15y+60-9y=18
Multiply -5 times -3y-12.
6y+60=18
Add 15y to -9y.
6y=-42
Subtract 60 from both sides of the equation.
y=-7
Divide both sides by 6.
x=-3\left(-7\right)-12
Substitute -7 for y in x=-3y-12. Because the resulting equation contains only one variable, you can solve for x directly.
x=21-12
Multiply -3 times -7.
x=9
Add -12 to 21.
x=9,y=-7
The system is now solved.
-x-3y=12,-5x-9y=18
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}12\\18\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right))\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right))\left(\begin{matrix}12\\18\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right).
\left(\begin{matrix}1&0\\0&1\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right))\left(\begin{matrix}12\\18\end{matrix}\right)
The product of a matrix and its inverse is the identity matrix.
\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}-1&-3\\-5&-9\end{matrix}\right))\left(\begin{matrix}12\\18\end{matrix}\right)
Multiply the matrices on the left hand side of the equal sign.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}-\frac{9}{-\left(-9\right)-\left(-3\left(-5\right)\right)}&-\frac{-3}{-\left(-9\right)-\left(-3\left(-5\right)\right)}\\-\frac{-5}{-\left(-9\right)-\left(-3\left(-5\right)\right)}&-\frac{1}{-\left(-9\right)-\left(-3\left(-5\right)\right)}\end{matrix}\right)\left(\begin{matrix}12\\18\end{matrix}\right)
For the 2\times 2 matrix \left(\begin{matrix}a&b\\c&d\end{matrix}\right), the inverse matrix is \left(\begin{matrix}\frac{d}{ad-bc}&\frac{-b}{ad-bc}\\\frac{-c}{ad-bc}&\frac{a}{ad-bc}\end{matrix}\right), so the matrix equation can be rewritten as a matrix multiplication problem.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{3}{2}&-\frac{1}{2}\\-\frac{5}{6}&\frac{1}{6}\end{matrix}\right)\left(\begin{matrix}12\\18\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{3}{2}\times 12-\frac{1}{2}\times 18\\-\frac{5}{6}\times 12+\frac{1}{6}\times 18\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}9\\-7\end{matrix}\right)
Do the arithmetic.
x=9,y=-7
Extract the matrix elements x and y.
-x-3y=12,-5x-9y=18
In order to solve by elimination, coefficients of one of the variables must be the same in both equations so that the variable will cancel out when one equation is subtracted from the other.
-5\left(-1\right)x-5\left(-3\right)y=-5\times 12,-\left(-5\right)x-\left(-9y\right)=-18
To make -x and -5x equal, multiply all terms on each side of the first equation by -5 and all terms on each side of the second by -1.
5x+15y=-60,5x+9y=-18
Simplify.
5x-5x+15y-9y=-60+18
Subtract 5x+9y=-18 from 5x+15y=-60 by subtracting like terms on each side of the equal sign.
15y-9y=-60+18
Add 5x to -5x. Terms 5x and -5x cancel out, leaving an equation with only one variable that can be solved.
6y=-60+18
Add 15y to -9y.
6y=-42
Add -60 to 18.
y=-7
Divide both sides by 6.
-5x-9\left(-7\right)=18
Substitute -7 for y in -5x-9y=18. Because the resulting equation contains only one variable, you can solve for x directly.
-5x+63=18
Multiply -9 times -7.
-5x=-45
Subtract 63 from both sides of the equation.
x=9
Divide both sides by -5.
x=9,y=-7
The system is now solved.