Affine functions represent vector-valued functions of the form
The coefficients can be scalars or dense or sparse matrices. The constant term is a scalar or a column vector.
In geometry, an affine transformation or affine map (from the Latin, affinis, "connected with") between two vector spaces consists of a linear transformation followed by a translation. In a geometric setting, these are precisely the functions that map straight lines to straight lines.