Face recognition works by using deep convolutional neural networks to extract 128-dimensional embedding vectors from face images that encode the facial features. The network is trained so that the similarity between embedding vectors matches the similarity between the actual faces, allowing faces to be recognized by comparing new images to those in a database. The network is trained iteratively by selecting an anchor image, finding other matching and non-matching faces, and adjusting the parameters to better reflect the similarities and differences between faces.