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

Similar Problems from Web Search

Share

2p+5q=58,6p+5q=74
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+5q=58
Choose one of the equations and solve it for p by isolating p on the left hand side of the equal sign.
2p=-5q+58
Subtract 5q from both sides of the equation.
p=\frac{1}{2}\left(-5q+58\right)
Divide both sides by 2.
p=-\frac{5}{2}q+29
Multiply \frac{1}{2} times -5q+58.
6\left(-\frac{5}{2}q+29\right)+5q=74
Substitute -\frac{5q}{2}+29 for p in the other equation, 6p+5q=74.
-15q+174+5q=74
Multiply 6 times -\frac{5q}{2}+29.
-10q+174=74
Add -15q to 5q.
-10q=-100
Subtract 174 from both sides of the equation.
q=10
Divide both sides by -10.
p=-\frac{5}{2}\times 10+29
Substitute 10 for q in p=-\frac{5}{2}q+29. Because the resulting equation contains only one variable, you can solve for p directly.
p=-25+29
Multiply -\frac{5}{2} times 10.
p=4
Add 29 to -25.
p=4,q=10
The system is now solved.
2p+5q=58,6p+5q=74
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}2&5\\6&5\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}58\\74\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}2&5\\6&5\end{matrix}\right))\left(\begin{matrix}2&5\\6&5\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=inverse(\left(\begin{matrix}2&5\\6&5\end{matrix}\right))\left(\begin{matrix}58\\74\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}2&5\\6&5\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&5\\6&5\end{matrix}\right))\left(\begin{matrix}58\\74\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&5\\6&5\end{matrix}\right))\left(\begin{matrix}58\\74\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{5}{2\times 5-5\times 6}&-\frac{5}{2\times 5-5\times 6}\\-\frac{6}{2\times 5-5\times 6}&\frac{2}{2\times 5-5\times 6}\end{matrix}\right)\left(\begin{matrix}58\\74\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}{4}&\frac{1}{4}\\\frac{3}{10}&-\frac{1}{10}\end{matrix}\right)\left(\begin{matrix}58\\74\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}-\frac{1}{4}\times 58+\frac{1}{4}\times 74\\\frac{3}{10}\times 58-\frac{1}{10}\times 74\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}4\\10\end{matrix}\right)
Do the arithmetic.
p=4,q=10
Extract the matrix elements p and q.
2p+5q=58,6p+5q=74
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-6p+5q-5q=58-74
Subtract 6p+5q=74 from 2p+5q=58 by subtracting like terms on each side of the equal sign.
2p-6p=58-74
Add 5q to -5q. Terms 5q and -5q cancel out, leaving an equation with only one variable that can be solved.
-4p=58-74
Add 2p to -6p.
-4p=-16
Add 58 to -74.
p=4
Divide both sides by -4.
6\times 4+5q=74
Substitute 4 for p in 6p+5q=74. Because the resulting equation contains only one variable, you can solve for q directly.
24+5q=74
Multiply 6 times 4.
5q=50
Subtract 24 from both sides of the equation.
q=10
Divide both sides by 5.
p=4,q=10
The system is now solved.