# What is Affine Transformation?

What is affine transformation? Which distribution families are closed under affine transformation?

• Could you please be more specific in what context you need to know that, whether this is a homework question and what is wrong with en.wikipedia.org/wiki/Affine_transformation ? – Momo Jun 26 '14 at 13:48
• I was asked in an interview.... the question was "give an example of statistical distribution, other than normal distribution, which is closed under affine transformation". – arnab Jun 26 '14 at 15:03
• All location-scale families are, by definition, closed under affine transformations, because in one dimension an affine transformation is just a shift in location together with a rescaling. Any family that is not already a location-scale family can be made into one by including all such transformations of its members. – whuber Jun 26 '14 at 15:20
• To add to @whuber's excellent comment that shows that the answer to the interview questions was "any": one can make any univariate distribution into a location-scale family by replacing the density $f(x)$ with $f^*(x)=\frac{f(\frac{x-mean}{sd})}{sd}$. – Momo Jun 26 '14 at 15:32
• en.wikipedia.org/wiki/Affine_transformation – kjetil b halvorsen Oct 31 '19 at 10:39

An affine transformation has the form $$f(x) = Ax + b$$ where $$A$$ is a matrix and $$b$$ is a vector (of proper dimensions, obviously).

• "There are probably many other such families" - in fact there are an infinite number of such families; see the discussion in the comments. – Silverfish Jan 16 '15 at 1:11

Affine transformation(left multiply a matrix), also called linear transformation(for more intuition please refer to this blog: A Geometrical Understanding of Matrices), is parallel preserving, and it only stretches, reflects, rotates(for example diagonal matrix or orthogonal matrix) or shears(matrix with off-diagonal elements) a vector(the same applies to many vectors/a matrix), and the "non-affine"(also a type of projective transformation as explained in the comment by @whuber) transformation may be like the first example in the following diagram:

More generally speaking affine transformation has the following three properties:

straight lines preserved
parallel lines preserved
ratios of lengths along lines preserved (midpoints preserved)

• It is difficult to see in what sense a projective transformation is any kind of "opposite" to an affine transformation. Indeed, affine transformations are special kinds of projective transformations. – whuber Dec 18 '19 at 14:50
• @whuber Glad to know that, then I wonder what the other projective transformations are except affine transformation? I mean the formal name of the "non-affine" transformation? Thanks for helping me figure out the "bug". – Lerner Zhang Dec 18 '19 at 14:57
• The projective transformations are the rational functions of order 1. On the line, for instance, they are given by four numbers $a,b,c,d$ as $$x\to \frac{ax+b}{cx+d}.$$ Usually they are limited to numbers where $ad-bc\ne 0$ for which the transformation is invertible. The transformations associated with $(a,b,c,d)$ and $(a\lambda,b\lambda,c\lambda,d\lambda)$ are the same when $\lambda\ne 0,$ making this a three-dimensional family of transformations. The affine transformations are those for which $c=0$ and $d\ne 0.$ – whuber Dec 18 '19 at 16:58

So I look here: http://mathworld.wolfram.com/AffineTransformation.html

It is a rotation. All points on a line, stay on the same line.

Per @Luca: It can have scaling, shear, translation as well. No bending. Straight lines are always straight.

• Affine is not just a rotation. It could be translation, shearing, scaling, rotation (and others) or any combinations of it AFAIK. I know normal distribution is closed under Affine transformations and it may be the case for the whole exponential family, but I am not sure about that. – Luca Jun 26 '14 at 14:13
• @Luca, I was thinking rotation in the homogenous sense, where a translation was a rotation through another dimension. Thank you for the clarification. The center of the rotation is in $\mathbb{R}^n$ then projected back to the original dimensionality of $\mathbb{R}^{m \leqslant n}$ – EngrStudent Jun 26 '14 at 14:19
• a common type of affine transformation is $\frac{aX-b}{c}$ btw – emcor Jun 26 '14 at 14:19
• @EngrStudent: Yeah, with homogeneous coordinates to make it a linear operation, it makes sense. But it still does not cover the full range of affine transformations, I think. – Luca Jun 26 '14 at 14:22
• @Luca All affine transformations of $\mathbb{R}^n$ can be derived from the linear transformations of $\mathbb{R}^{n+1}=\{x_1,x_2,\ldots,x_{n+1}\}$ that preserve the hyperplane $x_{n+1}=1$. Few of those linear transformations will be "rotations," though: by definition, the matrix of a rotation is orthogonal. – whuber Jun 26 '14 at 15:24