Skip to main content
Solve for p, q
Tick mark Image

Similar Problems from Web Search

Share

2p+9q=56,7p+9q=106
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.
2p+9q=56
Choose one of the equations and solve it for p by isolating p on the left hand side of the equal sign.
2p=-9q+56
Subtract 9q from both sides of the equation.
p=\frac{1}{2}\left(-9q+56\right)
Divide both sides by 2.
p=-\frac{9}{2}q+28
Multiply \frac{1}{2} times -9q+56.
7\left(-\frac{9}{2}q+28\right)+9q=106
Substitute -\frac{9q}{2}+28 for p in the other equation, 7p+9q=106.
-\frac{63}{2}q+196+9q=106
Multiply 7 times -\frac{9q}{2}+28.
-\frac{45}{2}q+196=106
Add -\frac{63q}{2} to 9q.
-\frac{45}{2}q=-90
Subtract 196 from both sides of the equation.
q=4
Divide both sides of the equation by -\frac{45}{2}, which is the same as multiplying both sides by the reciprocal of the fraction.
p=-\frac{9}{2}\times 4+28
Substitute 4 for q in p=-\frac{9}{2}q+28. Because the resulting equation contains only one variable, you can solve for p directly.
p=-18+28
Multiply -\frac{9}{2} times 4.
p=10
Add 28 to -18.
p=10,q=4
The system is now solved.
2p+9q=56,7p+9q=106
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}2&9\\7&9\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}56\\106\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}2&9\\7&9\end{matrix}\right))\left(\begin{matrix}2&9\\7&9\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=inverse(\left(\begin{matrix}2&9\\7&9\end{matrix}\right))\left(\begin{matrix}56\\106\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}2&9\\7&9\end{matrix}\right).
\left(\begin{matrix}1&0\\0&1\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=inverse(\left(\begin{matrix}2&9\\7&9\end{matrix}\right))\left(\begin{matrix}56\\106\end{matrix}\right)
The product of a matrix and its inverse is the identity matrix.
\left(\begin{matrix}p\\q\end{matrix}\right)=inverse(\left(\begin{matrix}2&9\\7&9\end{matrix}\right))\left(\begin{matrix}56\\106\end{matrix}\right)
Multiply the matrices on the left hand side of the equal sign.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}\frac{9}{2\times 9-9\times 7}&-\frac{9}{2\times 9-9\times 7}\\-\frac{7}{2\times 9-9\times 7}&\frac{2}{2\times 9-9\times 7}\end{matrix}\right)\left(\begin{matrix}56\\106\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}p\\q\end{matrix}\right)=\left(\begin{matrix}-\frac{1}{5}&\frac{1}{5}\\\frac{7}{45}&-\frac{2}{45}\end{matrix}\right)\left(\begin{matrix}56\\106\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}-\frac{1}{5}\times 56+\frac{1}{5}\times 106\\\frac{7}{45}\times 56-\frac{2}{45}\times 106\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}10\\4\end{matrix}\right)
Do the arithmetic.
p=10,q=4
Extract the matrix elements p and q.
2p+9q=56,7p+9q=106
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.
2p-7p+9q-9q=56-106
Subtract 7p+9q=106 from 2p+9q=56 by subtracting like terms on each side of the equal sign.
2p-7p=56-106
Add 9q to -9q. Terms 9q and -9q cancel out, leaving an equation with only one variable that can be solved.
-5p=56-106
Add 2p to -7p.
-5p=-50
Add 56 to -106.
p=10
Divide both sides by -5.
7\times 10+9q=106
Substitute 10 for p in 7p+9q=106. Because the resulting equation contains only one variable, you can solve for q directly.
70+9q=106
Multiply 7 times 10.
9q=36
Subtract 70 from both sides of the equation.
q=4
Divide both sides by 9.
p=10,q=4
The system is now solved.