Let's draw a diagram to represent this situation.
To prove PM is perpendicular, first, we have to prove that angles PMQ and PMR are equal.
Notice that sides PQ and PR are equal.
Also, by midpoint definition, sides QM and RM are equal.
Additionally, PM is a common side for both triangles PMQ and PMR.
As you can observe, we have three corresponding congruent sides.
From the congruence between the triangles, we can deduct that angles PMQ and PMR are congruent because they are corresponding angles from the congruence.
In the image you can observe that angles PMQ and PMR are supplementary, so
[tex]m\angle PMQ+m\angle PMR=180[/tex]But, these angles are congruent so,
[tex]\begin{gathered} 2(m\angle PMQ)=180 \\ m\angle PMQ=\frac{180}{2} \\ m\angle PMQ=90 \end{gathered}[/tex]