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

Similar Problems from Web Search

Share

ax+by=9,2bx+\left(-a\right)y=-6
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.
ax+by=9
Choose one of the equations and solve it for x by isolating x on the left hand side of the equal sign.
ax=\left(-b\right)y+9
Subtract by from both sides of the equation.
x=\frac{1}{a}\left(\left(-b\right)y+9\right)
Divide both sides by a.
x=\left(-\frac{b}{a}\right)y+\frac{9}{a}
Multiply \frac{1}{a} times -by+9.
2b\left(\left(-\frac{b}{a}\right)y+\frac{9}{a}\right)+\left(-a\right)y=-6
Substitute \frac{-by+9}{a} for x in the other equation, 2bx+\left(-a\right)y=-6.
\left(-\frac{2b^{2}}{a}\right)y+\frac{18b}{a}+\left(-a\right)y=-6
Multiply 2b times \frac{-by+9}{a}.
\left(-\frac{2b^{2}}{a}-a\right)y+\frac{18b}{a}=-6
Add -\frac{2b^{2}y}{a} to -ay.
\left(-\frac{2b^{2}}{a}-a\right)y=-\frac{18b}{a}-6
Subtract \frac{18b}{a} from both sides of the equation.
y=\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}
Divide both sides by -\frac{2b^{2}}{a}-a.
x=\left(-\frac{b}{a}\right)\times \frac{6\left(a+3b\right)}{a^{2}+2b^{2}}+\frac{9}{a}
Substitute \frac{6\left(3b+a\right)}{a^{2}+2b^{2}} for y in x=\left(-\frac{b}{a}\right)y+\frac{9}{a}. Because the resulting equation contains only one variable, you can solve for x directly.
x=-\frac{6b\left(a+3b\right)}{a\left(a^{2}+2b^{2}\right)}+\frac{9}{a}
Multiply -\frac{b}{a} times \frac{6\left(3b+a\right)}{a^{2}+2b^{2}}.
x=\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}}
Add \frac{9}{a} to -\frac{6b\left(3b+a\right)}{a\left(a^{2}+2b^{2}\right)}.
x=\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}},y=\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}
The system is now solved.
ax+by=9,2bx+\left(-a\right)y=-6
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}a&b\\2b&-a\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}9\\-6\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}a&b\\2b&-a\end{matrix}\right))\left(\begin{matrix}a&b\\2b&-a\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}a&b\\2b&-a\end{matrix}\right))\left(\begin{matrix}9\\-6\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}a&b\\2b&-a\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}a&b\\2b&-a\end{matrix}\right))\left(\begin{matrix}9\\-6\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}a&b\\2b&-a\end{matrix}\right))\left(\begin{matrix}9\\-6\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{a}{a\left(-a\right)-b\times 2b}&-\frac{b}{a\left(-a\right)-b\times 2b}\\-\frac{2b}{a\left(-a\right)-b\times 2b}&\frac{a}{a\left(-a\right)-b\times 2b}\end{matrix}\right)\left(\begin{matrix}9\\-6\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{a}{a^{2}+2b^{2}}&\frac{b}{a^{2}+2b^{2}}\\\frac{2b}{a^{2}+2b^{2}}&-\frac{a}{a^{2}+2b^{2}}\end{matrix}\right)\left(\begin{matrix}9\\-6\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{a}{a^{2}+2b^{2}}\times 9+\frac{b}{a^{2}+2b^{2}}\left(-6\right)\\\frac{2b}{a^{2}+2b^{2}}\times 9+\left(-\frac{a}{a^{2}+2b^{2}}\right)\left(-6\right)\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}}\\\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}\end{matrix}\right)
Do the arithmetic.
x=\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}},y=\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}
Extract the matrix elements x and y.
ax+by=9,2bx+\left(-a\right)y=-6
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.
2bax+2bby=2b\times 9,a\times 2bx+a\left(-a\right)y=a\left(-6\right)
To make ax and 2bx equal, multiply all terms on each side of the first equation by 2b and all terms on each side of the second by a.
2abx+2b^{2}y=18b,2abx+\left(-a^{2}\right)y=-6a
Simplify.
2abx+\left(-2ab\right)x+2b^{2}y+a^{2}y=18b+6a
Subtract 2abx+\left(-a^{2}\right)y=-6a from 2abx+2b^{2}y=18b by subtracting like terms on each side of the equal sign.
2b^{2}y+a^{2}y=18b+6a
Add 2bax to -2bax. Terms 2bax and -2bax cancel out, leaving an equation with only one variable that can be solved.
\left(a^{2}+2b^{2}\right)y=18b+6a
Add 2b^{2}y to a^{2}y.
\left(a^{2}+2b^{2}\right)y=6a+18b
Add 18b to 6a.
y=\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}
Divide both sides by 2b^{2}+a^{2}.
2bx+\left(-a\right)\times \frac{6\left(a+3b\right)}{a^{2}+2b^{2}}=-6
Substitute \frac{6\left(a+3b\right)}{2b^{2}+a^{2}} for y in 2bx+\left(-a\right)y=-6. Because the resulting equation contains only one variable, you can solve for x directly.
2bx-\frac{6a\left(a+3b\right)}{a^{2}+2b^{2}}=-6
Multiply -a times \frac{6\left(a+3b\right)}{2b^{2}+a^{2}}.
2bx=\frac{6b\left(3a-2b\right)}{a^{2}+2b^{2}}
Add \frac{6a\left(a+3b\right)}{2b^{2}+a^{2}} to both sides of the equation.
x=\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}}
Divide both sides by 2b.
x=\frac{3\left(3a-2b\right)}{a^{2}+2b^{2}},y=\frac{6\left(a+3b\right)}{a^{2}+2b^{2}}
The system is now solved.