Solve for x, y
x=\frac{14a+19b}{2a^{2}+b^{2}}
y=-\frac{2\left(19a-7b\right)}{2a^{2}+b^{2}}
b\neq 0\text{ or }a\neq 0
Graph
Share
Copied to clipboard
2ax+by=14,\left(-b\right)x+ay=-19
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.
2ax+by=14
Choose one of the equations and solve it for x by isolating x on the left hand side of the equal sign.
2ax=\left(-b\right)y+14
Subtract by from both sides of the equation.
x=\frac{1}{2a}\left(\left(-b\right)y+14\right)
Divide both sides by 2a.
x=\left(-\frac{b}{2a}\right)y+\frac{7}{a}
Multiply \frac{1}{2a} times -by+14.
\left(-b\right)\left(\left(-\frac{b}{2a}\right)y+\frac{7}{a}\right)+ay=-19
Substitute \frac{-by+14}{2a} for x in the other equation, \left(-b\right)x+ay=-19.
\frac{b^{2}}{2a}y-\frac{7b}{a}+ay=-19
Multiply -b times \frac{-by+14}{2a}.
\left(\frac{b^{2}}{2a}+a\right)y-\frac{7b}{a}=-19
Add \frac{b^{2}y}{2a} to ay.
\left(\frac{b^{2}}{2a}+a\right)y=\frac{7b}{a}-19
Add \frac{7b}{a} to both sides of the equation.
y=\frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}
Divide both sides by a+\frac{b^{2}}{2a}.
x=\left(-\frac{b}{2a}\right)\times \frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}+\frac{7}{a}
Substitute \frac{2\left(7b-19a\right)}{2a^{2}+b^{2}} for y in x=\left(-\frac{b}{2a}\right)y+\frac{7}{a}. Because the resulting equation contains only one variable, you can solve for x directly.
x=-\frac{b\left(7b-19a\right)}{a\left(2a^{2}+b^{2}\right)}+\frac{7}{a}
Multiply -\frac{b}{2a} times \frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}.
x=\frac{14a+19b}{2a^{2}+b^{2}}
Add \frac{7}{a} to -\frac{b\left(7b-19a\right)}{a\left(2a^{2}+b^{2}\right)}.
x=\frac{14a+19b}{2a^{2}+b^{2}},y=\frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}
The system is now solved.
2ax+by=14,\left(-b\right)x+ay=-19
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}2a&b\\-b&a\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}14\\-19\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}2a&b\\-b&a\end{matrix}\right))\left(\begin{matrix}2a&b\\-b&a\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}2a&b\\-b&a\end{matrix}\right))\left(\begin{matrix}14\\-19\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}2a&b\\-b&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}2a&b\\-b&a\end{matrix}\right))\left(\begin{matrix}14\\-19\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}2a&b\\-b&a\end{matrix}\right))\left(\begin{matrix}14\\-19\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}{2aa-b\left(-b\right)}&-\frac{b}{2aa-b\left(-b\right)}\\-\frac{-b}{2aa-b\left(-b\right)}&\frac{2a}{2aa-b\left(-b\right)}\end{matrix}\right)\left(\begin{matrix}14\\-19\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}{2a^{2}+b^{2}}&-\frac{b}{2a^{2}+b^{2}}\\\frac{b}{2a^{2}+b^{2}}&\frac{2a}{2a^{2}+b^{2}}\end{matrix}\right)\left(\begin{matrix}14\\-19\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{a}{2a^{2}+b^{2}}\times 14+\left(-\frac{b}{2a^{2}+b^{2}}\right)\left(-19\right)\\\frac{b}{2a^{2}+b^{2}}\times 14+\frac{2a}{2a^{2}+b^{2}}\left(-19\right)\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}\frac{14a+19b}{2a^{2}+b^{2}}\\\frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}\end{matrix}\right)
Do the arithmetic.
x=\frac{14a+19b}{2a^{2}+b^{2}},y=\frac{2\left(7b-19a\right)}{2a^{2}+b^{2}}
Extract the matrix elements x and y.
2ax+by=14,\left(-b\right)x+ay=-19
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(-b\right)\times 2ax+\left(-b\right)by=\left(-b\right)\times 14,2a\left(-b\right)x+2aay=2a\left(-19\right)
To make 2ax and -bx equal, multiply all terms on each side of the first equation by -b and all terms on each side of the second by 2a.
\left(-2ab\right)x+\left(-b^{2}\right)y=-14b,\left(-2ab\right)x+2a^{2}y=-38a
Simplify.
\left(-2ab\right)x+2abx+\left(-b^{2}\right)y+\left(-2a^{2}\right)y=-14b+38a
Subtract \left(-2ab\right)x+2a^{2}y=-38a from \left(-2ab\right)x+\left(-b^{2}\right)y=-14b by subtracting like terms on each side of the equal sign.
\left(-b^{2}\right)y+\left(-2a^{2}\right)y=-14b+38a
Add -2bax to 2bax. Terms -2bax and 2bax cancel out, leaving an equation with only one variable that can be solved.
\left(-2a^{2}-b^{2}\right)y=-14b+38a
Add -b^{2}y to -2a^{2}y.
\left(-2a^{2}-b^{2}\right)y=38a-14b
Add -14b to 38a.
y=-\frac{2\left(19a-7b\right)}{2a^{2}+b^{2}}
Divide both sides by -b^{2}-2a^{2}.
\left(-b\right)x+a\left(-\frac{2\left(19a-7b\right)}{2a^{2}+b^{2}}\right)=-19
Substitute -\frac{2\left(-7b+19a\right)}{b^{2}+2a^{2}} for y in \left(-b\right)x+ay=-19. Because the resulting equation contains only one variable, you can solve for x directly.
\left(-b\right)x-\frac{2a\left(19a-7b\right)}{2a^{2}+b^{2}}=-19
Multiply a times -\frac{2\left(-7b+19a\right)}{b^{2}+2a^{2}}.
\left(-b\right)x=-\frac{b\left(14a+19b\right)}{2a^{2}+b^{2}}
Add \frac{2a\left(-7b+19a\right)}{b^{2}+2a^{2}} to both sides of the equation.
x=\frac{14a+19b}{2a^{2}+b^{2}}
Divide both sides by -b.
x=\frac{14a+19b}{2a^{2}+b^{2}},y=-\frac{2\left(19a-7b\right)}{2a^{2}+b^{2}}
The system is now solved.
Examples
Quadratic equation
{ x } ^ { 2 } - 4 x - 5 = 0
Trigonometry
4 \sin \theta \cos \theta = 2 \sin \theta
Linear equation
y = 3x + 4
Arithmetic
699 * 533
Matrix
\left[ \begin{array} { l l } { 2 } & { 3 } \\ { 5 } & { 4 } \end{array} \right] \left[ \begin{array} { l l l } { 2 } & { 0 } & { 3 } \\ { -1 } & { 1 } & { 5 } \end{array} \right]
Simultaneous equation
\left. \begin{cases} { 8x+2y = 46 } \\ { 7x+3y = 47 } \end{cases} \right.
Differentiation
\frac { d } { d x } \frac { ( 3 x ^ { 2 } - 2 ) } { ( x - 5 ) }
Integration
\int _ { 0 } ^ { 1 } x e ^ { - x ^ { 2 } } d x
Limits
\lim _{x \rightarrow-3} \frac{x^{2}-9}{x^{2}+2 x-3}