Proof for an orthogonal matrix having transpose as inverse The given definition of an orthogonal matrix $A \in R^{nxn}$ is:
$$\langle Av,Aw\rangle = \langle v,w\rangle$$ for all $v,w \in R^n$.
Now I have to prove that for any orthogonal matrix A implies $A^T = A^{-1}$.
After some time I could not get a solution, but I have found this proof in a textbook about linear algebra:
Because $\langle A*v,A*w \rangle = (A*v)^T * (A*w) = v^T * (A^T * A) * w$ and $\langle v,w \rangle = v^T * w$, therefore follows through insertion of $v = e_i$ and $w = e_j$ that:
$A^T * A = E_n$ and $A^{-1} = A^T$
is equivalent to the term of the definition.
My problem with this proof is, that I do not understand why the replacement of $v = e_i$ and $w = e_j$ leads to $A^{-1} = A^T$. If I try it with some example values I get null. Where is my mistake to understand the proof?
Thank you for your answers.
 A: The key is that the transpose is the unique matrix for which $\langle Av,Aw\rangle = \langle A^TAv,w\rangle$ for all $v$ and $w.$ If $e_i$ form an orthonormal basis of $\mathbb{R}^n$, then $\delta_{ij} = \langle e_i,e_j\rangle = \langle Ae_i,Ae_j\rangle = \langle A^TAe_i,e_j\rangle$, hence $A^TAe_i = e_i$.
A: We have $e_{i}^{T}*e_{j}=1$, if $i=j$ and $e_{i}^{T}*e_{j}=0$, if $i\neq j$.  If $A^{T}A=(a_{ij})$,  $v^{T} * (A^{T} * A) * w=a_{ij}$. Therefore $$a_{ij}=v^{T} * (A^{T} * A) * w=\langle A*v,A*w\rangle=\langle v,w\rangle=v^{T}*w=\left\{\begin{array}{ccc}1,&\mbox{if}&i=j\\0,&if&i\neq j\end{array}\right.$$
A: Let the columns of the matrix $A$ be $w_i$ $(i=1,\dots,n)$. Now you can write the product of $A^T$ and $A$ as
$$A^TA = [\langle w_i,w_j \rangle].$$
Lets take a look at $\langle w_i, w_j \rangle$ for some fixed $i,j$. Notice that $w_i = Ae_i$ and $w_j = Ae_j$. Now we can use orthogonality to get
$$\langle w_i, w_j \rangle = \langle Ae_i, Ae_j \rangle = \langle e_i, e_j \rangle.$$
Hence, $\langle w_i, w_j \rangle = 1$ when $i=j$ and $\langle w_i, w_j \rangle = 0$ when $i \neq j$. This means that $A^TA = I_n$.
