what is the difference between linear transformation and affine transformation? Recently, I am struglling with the difference between linear transformation and affine transformation. Are they the same ? 
I found an interesting question on the difference between the functions. But still, not very clear. 
What is the difference between linear and affine function
http://mathworld.wolfram.com/AffineTransformation.html
 A: Let $V,W$ be some $\Bbb K$ vector space.


*

*$f:V \to W$ is linear if for every $\alpha,\mu\in \Bbb K$ and $v_1,v_2\in V$ we have $f(\alpha v_1+\mu v_2) = \alpha f(v_1)+\mu f(v_2)$.

*$g:V\to W$ is affine if there exists $b\in V$ such that $\tilde g:V\to W:v \mapsto g(v)-b$ is linear.
A: An alternative point of view is that, given any vector space $V$, we extend it by one dimension by including a new nonzero vector $o$ and also all linear combinations of it and the existing vectors. Call this new vector space, an affine space and denote it $a(V,o)$. Call the elements of $V+o$ points of the affine space and any nonzero vector is a scalar multiple of some point which we call a weighted point where the scalar is the weight of the point. Now if a linear map between two affine spaces $f: a(V_1,o_1) \to a(V_2,o_2)$ satisfies $f(V_1)\subset V_2$ and $f(o_1) = v_2 + o_2$ where $v_2\in V_2$, then we call it an affine map. That is, we require this because we want points to map to points. You can check that composition of affine maps is affine and $f(v_1 + o_1) = (f(v_1) + v_2) + o_2$. This is like the usual $y=mx+b$. Think of the vector $o$ as a bookkeeping device to keep track of an origin. That is, in a vector space there is a unique zero vector, but in an affine space, all points can be regarded effectively as an origin. If $f(o_1) = o_2$ then $v_2=0$ and $f$ is just a linear map just like $y=mx$. So all affine maps are linear but not vice versa.
A: A linear transformation is any transformation $f: U\to V$ between vector spaces over $\mathbb F$ for which

*

*$f(x+y)=f(x)+f(y)$

*$f(\alpha x) = \alpha f(x)$
for all $x,y\in U$ and all $\alpha\in\mathbb F$.
An affine transformation is any transformation $f:U\to V$ for which, if $\sum_i\lambda_i = 1$, $$f(\sum_i \lambda_i x_i) = \sum_i \lambda_i f(x_i)$$
for all sets of vectors $x_i\in U$.
In effect, what these two definitions mean is:

*

*All linear transformations are affine transformations.

*Not all affine transformations are linear transformations.

*It can be shown that any affine transformation $A:U\to V$ can be written as $A(x) = L(x) + v_0$, where $v_0$ is some vector from $V$ and $L:U\to V$ is a linear transformation.

Take an example where $U=V=\mathbb R^2$. Then $$f:(x,y) \mapsto(-2x+y, 3x+8y)$$ is a linear transformation, since
$$f((x_1,y_1)+(x_2, y_2)) = (-2(x_1+x_2) + y_1+y_2, 3(x_1+x_2) + 8(y_1+y_2)) = \\ 
= (-2x_1 + y_1, 3x_1 + 8y_1) + (-2x_2 + y_2, 3x_2 + 8y_2) = f((x_1,y_1)+f((x_2, y_2))$$
However, $$g:(x,y)\mapsto (-2x+y+5, 3x+8y-2)$$
is not a linear transformation(you can immediatelly see this since $g((0,0)) \neq (0,0)$, while linear transformation always map $0$ to $0$).
Both $g$ and $f$ are (you can check) affine transformation.
