In linear algebra, why is it that linear transformation is orthogonal if it preserves the length of vectors? How are orthogonality and preserving length of a linear transformation even relating? A linear transformation can also be orthogonal even if it doesn't preserve the length of vector.
 A: In general, a linear map $T$ is defined to be orthogonal if $T$ preserves inner products. To be more specific, if $T$ is a function from a vector space $V$ to itself, $T$ is defined to be orthogonal if $\langle v,w\rangle=\langle Tv,Tw\rangle$ for every $v$ and $w$ in $V$. 
Now we suppose $T$ is a linear map such that $|Tv|=|v|$ for every $v\in V$. (For simplicity, we assume $V$ is a vector space over $\mathbb{R}$). Consider $$|Tv+Tw|^2=\langle Tv+Tw,Tv+Tw\rangle=\langle Tv,Tv\rangle+2\langle Tv,Tw\rangle+\langle Tw,Tw\rangle$$$$=|Tv|^2+|Tw|^2+2\langle Tv,Tw\rangle.$$ Similarly, we have $$|v+w|^2=\langle v+w,v+w\rangle=\langle v,v\rangle+2\langle v,w\rangle+\langle w,w\rangle=|v|^2+|w|^2+2\langle v,w\rangle.$$ Now, we note $|Tv+Tw|=|v+w|$ and $|Tv|=|v|$ and $|Tw|=|w|$. Thus, we have $$|Tv|^2+|Tw|^2+2\langle Tv,Tw\rangle=|v|^2+|w|^2+2\langle v,w\rangle\implies 2\langle Tv,Tw\rangle=2\langle v,w\rangle.$$ So we have shown that $T$ does preserve inner products.
A: The square of the length of a vector $x$ is $\langle x,x \rangle$. The length-squared of the image of $x$ after a transformation $A$ is $\langle Ax,Ax \rangle$. 
The definition of the adjoint is the map so that $\langle Ax,y \rangle = \langle x, A^T y \rangle$ for all $x$ and $y$. So $\langle Ax,Ax \rangle = \langle x,A^TAx \rangle$. So length is preserved if and only if
$$ \langle x,A^TAx \rangle = \langle x,x \rangle, $$
or
$$ \langle x,(A^TA-I)x \rangle = 0 $$
for all $x$. Hence $A^TA = I$, which is the definition of an orthogonal transformation. Why? Because the same is true of the inner product of any $x$ and $y$: if $A$ is orthogonal,
$$ \langle Ax,Ay \rangle = \langle x,A^TAy \rangle = \langle x,Iy \rangle = \langle x,y \rangle $$

It may bother you that the inner product is used to define length. We can actually define the inner product using only lengths, using the polarisation identity,
$$ \langle x,y\rangle = \frac{1}{4}(\lVert x+y \rVert^2 - \lVert x-y \rVert^2), $$
so preserving lengths is intimately related to preserving the inner product.
A: You can talk about orthogonality in an inner product space. Now, orthogonal linear transformations preserve the inner product, i.e. the inner product between two vectors $x$  and $ y $ is the same as the inner product or $Tx$ and $Ty$ where $ T $ is the orthogonal transformation. Now, the inner product induces a norm. Thus, you can easily deduce that an orthogonal linear transformation is an isometry hence preserves length.
