Skip to main content
Solve for x, y (complex solution)
Tick mark Image
Solve for x, y
Tick mark Image
Graph

Similar Problems from Web Search

Share

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