
The straight line is the linear regression of a function that takes scalars (x-values) as input and returns scalars (y-values) as output. (figure from GANFYD)
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 pink parallelogram is the multi-linear regression of a function that takes vectors (gray dots) as input and returns vectors (blue dots) as output
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