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

Similar Problems from Web Search

Share

Ax+By=C,Dx+Cy=F
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=C
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+C
Subtract By from both sides of the equation.
x=\frac{1}{A}\left(\left(-B\right)y+C\right)
Divide both sides by A.
x=\left(-\frac{B}{A}\right)y+\frac{C}{A}
Multiply \frac{1}{A} times -By+C.
D\left(\left(-\frac{B}{A}\right)y+\frac{C}{A}\right)+Cy=F
Substitute \frac{-By+C}{A} for x in the other equation, Dx+Cy=F.
\left(-\frac{BD}{A}\right)y+\frac{CD}{A}+Cy=F
Multiply D times \frac{-By+C}{A}.
\left(-\frac{BD}{A}+C\right)y+\frac{CD}{A}=F
Add -\frac{DBy}{A} to Cy.
\left(-\frac{BD}{A}+C\right)y=-\frac{CD}{A}+F
Subtract \frac{DC}{A} from both sides of the equation.
y=\frac{AF-CD}{AC-BD}
Divide both sides by C-\frac{DB}{A}.
x=\left(-\frac{B}{A}\right)\times \frac{AF-CD}{AC-BD}+\frac{C}{A}
Substitute \frac{FA-DC}{CA-DB} for y in x=\left(-\frac{B}{A}\right)y+\frac{C}{A}. Because the resulting equation contains only one variable, you can solve for x directly.
x=-\frac{B\left(AF-CD\right)}{A\left(AC-BD\right)}+\frac{C}{A}
Multiply -\frac{B}{A} times \frac{FA-DC}{CA-DB}.
x=\frac{C^{2}-BF}{AC-BD}
Add \frac{C}{A} to -\frac{B\left(FA-DC\right)}{A\left(CA-DB\right)}.
x=\frac{C^{2}-BF}{AC-BD},y=\frac{AF-CD}{AC-BD}
The system is now solved.
Ax+By=C,Dx+Cy=F
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}A&B\\D&C\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}C\\F\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}A&B\\D&C\end{matrix}\right))\left(\begin{matrix}A&B\\D&C\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}A&B\\D&C\end{matrix}\right))\left(\begin{matrix}C\\F\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}A&B\\D&C\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\\D&C\end{matrix}\right))\left(\begin{matrix}C\\F\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\\D&C\end{matrix}\right))\left(\begin{matrix}C\\F\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{C}{AC-BD}&-\frac{B}{AC-BD}\\-\frac{D}{AC-BD}&\frac{A}{AC-BD}\end{matrix}\right)\left(\begin{matrix}C\\F\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{C}{AC-BD}C+\left(-\frac{B}{AC-BD}\right)F\\\left(-\frac{D}{AC-BD}\right)C+\frac{A}{AC-BD}F\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{BF-C^{2}}{BD-AC}\\\frac{CD-AF}{BD-AC}\end{matrix}\right)
Do the arithmetic.
x=\frac{BF-C^{2}}{BD-AC},y=\frac{CD-AF}{BD-AC}
Extract the matrix elements x and y.
Ax+By=C,Dx+Cy=F
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.
DAx+DBy=DC,ADx+ACy=AF
To make Ax and Dx equal, multiply all terms on each side of the first equation by D and all terms on each side of the second by A.
ADx+BDy=CD,ADx+ACy=AF
Simplify.
ADx+\left(-AD\right)x+BDy+\left(-AC\right)y=CD-AF
Subtract ADx+ACy=AF from ADx+BDy=CD by subtracting like terms on each side of the equal sign.
BDy+\left(-AC\right)y=CD-AF
Add DAx to -DAx. Terms DAx and -DAx cancel out, leaving an equation with only one variable that can be solved.
\left(BD-AC\right)y=CD-AF
Add DBy to -ACy.
y=\frac{CD-AF}{BD-AC}
Divide both sides by DB-AC.
Dx+C\times \frac{CD-AF}{BD-AC}=F
Substitute \frac{DC-AF}{DB-AC} for y in Dx+Cy=F. Because the resulting equation contains only one variable, you can solve for x directly.
Dx+\frac{C\left(CD-AF\right)}{BD-AC}=F
Multiply C times \frac{DC-AF}{DB-AC}.
Dx=\frac{D\left(BF-C^{2}\right)}{BD-AC}
Subtract \frac{C\left(DC-AF\right)}{DB-AC} from both sides of the equation.
x=\frac{BF-C^{2}}{BD-AC}
Divide both sides by D.
x=\frac{BF-C^{2}}{BD-AC},y=\frac{CD-AF}{BD-AC}
The system is now solved.