Proof of sine and cosine rules