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

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