To find Q, we use the SSS (side-side-side) theorem.
The law of cosine formula:
a^2 = b^2 + c^2 - 2bcCosA
using the letters in the diagram and since we looking for Q, it becomes:
q^2 = p^2 + r^2 -2prCosQ
Making Cos Q, the subject of formula:
q² - p² - r² = -2prCosQ
(q² - p² - r²)/-2pr = -2prCosQ/-2pr
(q² - p² - r²)/-2pr = CosQ
Cos Q = -(q² - p² - r²)/2pr
q =