Here are the definitions I am using:
- Orthogonality: Two vectors $x$ and $y$ are orthogonal iff $\langle x,y \rangle=0$.
- Orthonormal: If two vectors $x$ and $y$ are orthogonal and $||x|| = 1 = ||y||$ then $x$ and $y$ are orthonormal.
- Orthogonal Matrix: A square matrix $\mathbf A \in \Bbb {R}^{n \times n}$ is an orthogonal matrix iff its columns are orthonormal so that $\mathbf {AA^T = I = A^TA}$.
Suppose we use an inner product defined by:
$$\langle x, y \rangle = x^T \begin{bmatrix} 2 & 1 & 0 \\ 1 & 2 & -1 \\ 0 & -1 & 2 \\ \end{bmatrix}y$$
We define $e_1, e_2, e_3$ as the standard basis vectors in $\Bbb {R}^{3}$.
When we evaluate the inner products we find:
$\langle e_1, e_3 \rangle = 0$
$\langle e_1, e_2 \rangle = 1$
$\langle e_3, e_2 \rangle = -1$
So clearly using this inner product, only the basis vectors $e_1$ and $e_3$ are orthogonal.
Separately, if I construct a matrix made by the basis vectors:
$\mathbf A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
It holds true that $\mathbf {AA^T = I = A^TA}$.
Is the matrix $\mathbf A$ orthogonal? Because the columns (using our definition of the inner product) are not actually orthogonal and therefore cannot be orthonormal, but the multiplication to identity holds.
If you need to check whether the columns are orthogonal or not for an inner product defined by an inner product, it is not $A A^T$ that you must consider.
Indeed with: $$\langle x, y \rangle =x^T M y$$
you have $A=(e_1, \ldots, e_n)$ is orthonormal iff: $$ \forall i,j \, \, \langle e_i , e_j \rangle=e_i^T M e_j =\delta_{i,j}$$ i.e in matrix notation:
for the standard inner product $M=I$ so you obtain $A^T A$, but in your example: $$M=\begin{bmatrix} 2 & 1 & 0 \\ 1 & 2 & -1 \\ 0 & -1 & 2 \\ \end{bmatrix}$$
so $A^T M A \neq I$.