Snell's law

Angle of incidence $\theta_1$ and angle of refraction $\theta_2$ are related by $$ \begin{align*} n_1 \sin \theta_1 = n_2 \sin\theta_2. \end{align*} $$ (Derivation)

Total internal refraction occurs when $\sin\theta_2 > 1$.