Heise has an article about some work of IT security research in Vietnam. The Face ID technology has a lot to do with multivariable calculus. The sensor works similarly as the Kinect sensor, a technology which Microsoft had originally bought.
Face id projects 30'000 infrared dots onto a face. The way how these dots look like allow not only to determine the distance of each point but also the gradient of the tangent plane. This allows to produce a more accurate 3D facial map than simply distance measuring. What happens with a dot is that after reflection it is seen as an ellipse (this is due to linearization). The shape of the ellipse gives information about the distance and the direction of the normal vector.