A formulation of the laws of reflection and refraction of optical rays by the interface of two isotropic media using the mathematical apparatus of geometric algebra is given. The cases of specular reflection, positive and negative refraction, and refraction in the presence of a metasurface are considered.