Proof of orthogonal matrix In the following question we regard vectors in $\Bbb R^n$
as columns and define the dot product in the usual way which means that $x · y$ = $x^{t}y$
a) If A is an n × n matrix show that $A_{ij}$ = $e_i \cdot A e_j$ where $e_i$, $i =1, \dots , n$ are the standard basis vectors in $\Bbb R^n$
b) Show that a matrix $P$ is orthogonal if and only if ($Px$) · ($Py$) =$x · y$ for all $x, y$ ∈ $\Bbb R^n$
Working - 
I got part (a) alright but have no idea of where to start with part (b) except to use the information that an n x n matrix $P$ is orthogonal if $P^{-1}$= $P^{t}$ and that $P^{t}$$P$=$I$, $P$$P^{t}$=$I$, where $I$ is the identity matrix. Any suggests are gracefully appreciated. Feel free to edit my question for clarity. Thank you
 A: Following up on @Augustin suggestion, write
$$(Px)\cdot (Py)=(Px)^T\cdot (Py)=x^T(P^TP)y$$
for arbitrary $x$ and $y$. So if $P^TP=I$ one has $\forall x,y \,(Px)\cdot (Py)=x\cdot y$
Assume now that the last equality holds. Consider a basis $(e_i)$ and compute 
$$e_i^TP^TPe_j=(P^TP)_{ij}=(Pe_i)\cdot (Pe_j)=e_i\cdot e_j=\delta_{ij}$$
And $P^TP=I$
A: b)  (i) If $P$ is orthogonal $(Px) · (Py) =x⋅y$:
$(Px) \cdot (Py) = x^t P^t P y = x^t y = x \cdot y$
(ii) If $(Px) \cdot (Py) = x \cdot y$ for all $x,y \in \mathbb{R}^n$,then $P$ is orthogonal. 
Take $x = e_i$, and $y = e_j$. Let $P_i$ denote the $i^{th}$ column of $P$. Consequently, it's $k^{th}$ element is $P_{ki}$.
$(Pe_i) \cdot (Pe_j) = \delta_{ij}$
$\Rightarrow P_i \cdot P_j = \delta_{ij}$
$\Rightarrow \underset{k}{\sum} P_{ki}P_{kj}= \delta_{ij}$
$\Rightarrow \underset{k}{\sum} P^t_{ik}P_{kj}= \delta_{ij}$
$\Rightarrow (P^t P)_{ij} = \delta_{ij}$
$\Rightarrow P^t P = I$.
($\delta_{ij}$ is the Kronecker delta.)
A: For b, I will just discuss the second part: If (Px)⋅(Py)=x⋅y, then P is orthogonal.
  Take x=ei and y=ej; P={v1,v2...,vn}
  When i≠j, (Px)=vi,(Py)=vj,
   => (Px)⋅(Py)=vi⋅vj=ei⋅ej=0
  When i=j
   => (Px)⋅(Py)=vi⋅vj=ei⋅ei=1
  Then{v1,v2...,vn} is an orthonormal basis, and hence P is orthogonal.
