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

Similar Problems from Web Search

Share

8p+5q=47,12p+4q=81
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.
8p+5q=47
Choose one of the equations and solve it for p by isolating p on the left hand side of the equal sign.
8p=-5q+47
Subtract 5q from both sides of the equation.
p=\frac{1}{8}\left(-5q+47\right)
Divide both sides by 8.
p=-\frac{5}{8}q+\frac{47}{8}
Multiply \frac{1}{8} times -5q+47.
12\left(-\frac{5}{8}q+\frac{47}{8}\right)+4q=81
Substitute \frac{-5q+47}{8} for p in the other equation, 12p+4q=81.
-\frac{15}{2}q+\frac{141}{2}+4q=81
Multiply 12 times \frac{-5q+47}{8}.
-\frac{7}{2}q+\frac{141}{2}=81
Add -\frac{15q}{2} to 4q.
-\frac{7}{2}q=\frac{21}{2}
Subtract \frac{141}{2} from both sides of the equation.
q=-3
Divide both sides of the equation by -\frac{7}{2}, which is the same as multiplying both sides by the reciprocal of the fraction.
p=-\frac{5}{8}\left(-3\right)+\frac{47}{8}
Substitute -3 for q in p=-\frac{5}{8}q+\frac{47}{8}. Because the resulting equation contains only one variable, you can solve for p directly.
p=\frac{15+47}{8}
Multiply -\frac{5}{8} times -3.
p=\frac{31}{4}
Add \frac{47}{8} to \frac{15}{8} by finding a common denominator and adding the numerators. Then reduce the fraction to lowest terms if possible.
p=\frac{31}{4},q=-3
The system is now solved.
8p+5q=47,12p+4q=81
Put the equations in standard form and then use matrices to solve the system of equations.
\left(\begin{matrix}8&5\\12&4\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}47\\81\end{matrix}\right)
Write the equations in matrix form.
inverse(\left(\begin{matrix}8&5\\12&4\end{matrix}\right))\left(\begin{matrix}8&5\\12&4\end{matrix}\right)\left(\begin{matrix}p\\q\end{matrix}\right)=inverse(\left(\begin{matrix}8&5\\12&4\end{matrix}\right))\left(\begin{matrix}47\\81\end{matrix}\right)
Left multiply the equation by the inverse matrix of \left(\begin{matrix}8&5\\12&4\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}8&5\\12&4\end{matrix}\right))\left(\begin{matrix}47\\81\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}8&5\\12&4\end{matrix}\right))\left(\begin{matrix}47\\81\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{4}{8\times 4-5\times 12}&-\frac{5}{8\times 4-5\times 12}\\-\frac{12}{8\times 4-5\times 12}&\frac{8}{8\times 4-5\times 12}\end{matrix}\right)\left(\begin{matrix}47\\81\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}{7}&\frac{5}{28}\\\frac{3}{7}&-\frac{2}{7}\end{matrix}\right)\left(\begin{matrix}47\\81\end{matrix}\right)
Do the arithmetic.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}-\frac{1}{7}\times 47+\frac{5}{28}\times 81\\\frac{3}{7}\times 47-\frac{2}{7}\times 81\end{matrix}\right)
Multiply the matrices.
\left(\begin{matrix}p\\q\end{matrix}\right)=\left(\begin{matrix}\frac{31}{4}\\-3\end{matrix}\right)
Do the arithmetic.
p=\frac{31}{4},q=-3
Extract the matrix elements p and q.
8p+5q=47,12p+4q=81
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.
12\times 8p+12\times 5q=12\times 47,8\times 12p+8\times 4q=8\times 81
To make 8p and 12p equal, multiply all terms on each side of the first equation by 12 and all terms on each side of the second by 8.
96p+60q=564,96p+32q=648
Simplify.
96p-96p+60q-32q=564-648
Subtract 96p+32q=648 from 96p+60q=564 by subtracting like terms on each side of the equal sign.
60q-32q=564-648
Add 96p to -96p. Terms 96p and -96p cancel out, leaving an equation with only one variable that can be solved.
28q=564-648
Add 60q to -32q.
28q=-84
Add 564 to -648.
q=-3
Divide both sides by 28.
12p+4\left(-3\right)=81
Substitute -3 for q in 12p+4q=81. Because the resulting equation contains only one variable, you can solve for p directly.
12p-12=81
Multiply 4 times -3.
12p=93
Add 12 to both sides of the equation.
p=\frac{31}{4}
Divide both sides by 12.
p=\frac{31}{4},q=-3
The system is now solved.