Answer
See explanation
Work Step by Step
Using the law of cosines it follows:
$$c^{2}=a^{2}+b^{2}-2ab\cos(\theta)$$
Take the case when $c^{2}=a^{2}+b^{2}$ and find the nature of the triangle. So the above equation becomes:
$$a^{2}+b^{2}=a^{2}+b^{2}-2ab\cos(\theta)$$
$$0=-2ab\cos(\theta)$$
Since the length of sides are always non zero it follows that:
$$0=\cos(\theta)$$
$$\frac{\pi}{2}=\theta$$
Therefore, the angle $\theta$ is right and the triangle is right.
So if $c^{2}=a^{2}+b^{2}$ the triangle with side lengths $a$, $b$ and $c$ is right.