[Math] If the inner product is symmetric iff $A=A^{T}$

linear algebra

In class we defined the following inner product:

Let $A\in M_n(\mathbb{R})$, and let $\langle \cdot,\cdot \rangle :\mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}^n$ be defined as:

$$\langle x,y\rangle=x^TAy.$$

Now, I need to prove that the inner product is symmetric iff $A=A^{T}$.

Proof:

First direction:

If $A=A^{T}$, then $\langle Ax,y \rangle = \langle x,Ay \rangle$

$$\langle Ax,y \rangle =(Ax)^TAy=x^TA^TAy=x^TAAy=\langle x,Ay\rangle$$

The other direction:

Suppose that $\langle Ax,y \rangle = \langle x,Ay \rangle$, we want to show that $A=A^{T}$.

Here I chose to look at $x=e_i$ and $y=e_j$, standard basis vectors of $\mathbb{R}^n$.

I asked myself, what is $Ax$?

$Ax$ is column $i$ of $A$, hence $$\langle Ax,y \rangle=(\text{row $i$ of $A$})Ae_j$$

Which is equals to:

$$(\text{row $i$ of $A$})(\text{column $j$ of $A$})$$

Similarly,

$$\langle x,Ay \rangle =(\text{row $j$ of $A$})(\text{column $i$ of $A$})$$

Here I stopped.

Is my way correct so far? If so, how can I proceed?

Thank you very much.

Best Answer

If $A$ is symmetric then the claim follows readily since $$\langle\mathbf{x},\mathbf{y}\rangle = \mathbf{x}^\mathrm{T}A\mathbf{y} = \left(\mathbf{x}^\mathrm{T}A\mathbf{y}\right)^\mathrm{T} = \mathbf{y}^\mathrm{T}A^\mathrm{T}\mathbf{x} = \mathbf{y}^\mathrm{T}A\mathbf{x} = \langle\mathbf{y},\mathbf{x}\rangle$$ The second equality follows because $\mathbf{x}^\mathrm{T}A\mathbf{y}$ is $1\times 1$ (a number if you will) which is invariant under transpose. The second last equality follows since we assumed $A$ is symmetric by hypothesis.

Conversely, suppose that the inner product is symmetric. Then $$\langle\mathbf{e}_i,\ \mathbf{e}_j\rangle = \langle\mathbf{e}_j,\ \mathbf{e}_i\rangle$$ for all $1\le i,\ j\le n$ where we denote $\mathbf{e}_i$ as the $i$th standard basis vector. But note that $\mathbf{e}_i^\mathrm{T}A\mathbf{e}_j$ has the effect of selecting the $ij$th entry of $A$. Therefore $$(A)_{ij} = \langle\mathbf{e}_i,\ \mathbf{e}_j\rangle = \langle\mathbf{e}_j,\ \mathbf{e}_i\rangle = (A)_{ji}$$ which implies that $A$ is symmetric.