Skip to main content
Solve for x, y
Tick mark Image
Graph

Similar Problems from Web Search

Share

30x+15y=675,42x+20y=940
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.
30x+15y=675
Choose one of the equations and solve it for x by isolating x on the left hand side of the equal sign.
30x=-15y+675
Subtract 15y from both sides of the equation.
x=\frac{1}{30}\left(-15y+675\right)
Divide both sides by 30.
x=-\frac{1}{2}y+\frac{45}{2}
Multiply \frac{1}{30} times -15y+675.
42\left(-\frac{1}{2}y+\frac{45}{2}\right)+20y=940
Substitute \frac{-y+45}{2} for x in the other equation, 42x+20y=940.
-21y+945+20y=940
Multiply 42 times \frac{-y+45}{2}.
-y+945=940
Add -21y to 20y.
-y=-5
Subtract 945 from both sides of the equation.
y=5
Divide both sides by -1.
x=-\frac{1}{2}\times 5+\frac{45}{2}
Substitute 5 for y in x=-\frac{1}{2}y+\frac{45}{2}. Because the resulting equation contains only one variable, you can solve for x directly.
x=\frac{-5+45}{2}
Multiply -\frac{1}{2} times 5.
x=20
Add \frac{45}{2} to -\frac{5}{2} by finding a common denominator and adding the numerators. Then reduce the fraction to lowest terms if possible.
x=20,y=5
The system is now solved.
30x+15y=675,42x+20y=940
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}30&15\\42&20\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}675\\940\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}30&15\\42&20\end{matrix}\right))\left(\begin{matrix}30&15\\42&20\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)=inverse(\left(\begin{matrix}30&15\\42&20\end{matrix}\right))\left(\begin{matrix}675\\940\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}30&15\\42&20\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}30&15\\42&20\end{matrix}\right))\left(\begin{matrix}675\\940\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}30&15\\42&20\end{matrix}\right))\left(\begin{matrix}675\\940\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{20}{30\times 20-15\times 42}&-\frac{15}{30\times 20-15\times 42}\\-\frac{42}{30\times 20-15\times 42}&\frac{30}{30\times 20-15\times 42}\end{matrix}\right)\left(\begin{matrix}675\\940\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{2}{3}&\frac{1}{2}\\\frac{7}{5}&-1\end{matrix}\right)\left(\begin{matrix}675\\940\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}-\frac{2}{3}\times 675+\frac{1}{2}\times 940\\\frac{7}{5}\times 675-940\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}x\\y\end{matrix}\right)=\left(\begin{matrix}20\\5\end{matrix}\right)
Do the arithmetic.
x=20,y=5
Extract the matrix elements x and y.
30x+15y=675,42x+20y=940
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.
42\times 30x+42\times 15y=42\times 675,30\times 42x+30\times 20y=30\times 940
To make 30x and 42x equal, multiply all terms on each side of the first equation by 42 and all terms on each side of the second by 30.
1260x+630y=28350,1260x+600y=28200
Simplify.
1260x-1260x+630y-600y=28350-28200
Subtract 1260x+600y=28200 from 1260x+630y=28350 by subtracting like terms on each side of the equal sign.
630y-600y=28350-28200
Add 1260x to -1260x. Terms 1260x and -1260x cancel out, leaving an equation with only one variable that can be solved.
30y=28350-28200
Add 630y to -600y.
30y=150
Add 28350 to -28200.
y=5
Divide both sides by 30.
42x+20\times 5=940
Substitute 5 for y in 42x+20y=940. Because the resulting equation contains only one variable, you can solve for x directly.
42x+100=940
Multiply 20 times 5.
42x=840
Subtract 100 from both sides of the equation.
x=20
Divide both sides by 42.
x=20,y=5
The system is now solved.