You’ve probably seen classical equations for linear regression, which is a procedure that finds the straight line that best fits a set of discrete points . You might also be aware that similar formulas exist to find a straight line that is a best (least squares) fit to a continuous function .

The bottom of this post provides a link to a tutorial on how to generalize the concept of linear regression to fit a function that takes a vector as input and produces a vector as output. In mechanics, the most common example of this type of function is a mapping function that describes material deformation: the input vector is the initial location of a point on a body, and the output vector is the deformed location of the same point. The image shows a collection of input vectors (initial positions, as grey dots) and a collection of output vectors (deformed locations as blue dots). The affine fit to these descrete data is the pink parallelogram. Continue reading