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