I define a function $f[\mathbf{v}]$ as follows:
$$ f[\mathbf{v}]=\mathbf{v}^T\mathbf{v} $$
I am now interested in a group of linear transformation $M$ ($n\times n$ matrices) which leaves the function invariant:
$$ f[M\mathbf{v}]=f[\mathbf{v}] $$
To 'solve' for the properties of $M$, I consider two equality:
$$ M^TM=I\tag{1} $$
$$ \mathbf{v}^TM^TM\mathbf{v}=\mathbf{v}^T\mathbf{v}\tag{2} $$
Working out the details, I get different results for $M$ depending I use (1) or (2).
We assume $\operatorname{Dim} {\mathbf{v}}=2$ and $\operatorname{Dim} {M}=2 \times 2$.
$$ \mathbf{v}=\pmatrix{x\\y}\\ M=\pmatrix{a&b\\c&d} $$
For (1), I want to solve:
$$ \pmatrix{a&c\\b&d}\pmatrix{a&b\\c&d}=\pmatrix{1&0\\0&1}\tag{1a} $$
and for (2), I want to solve:
$$ \pmatrix{x&y}\pmatrix{a&c\\b&d}\pmatrix{a&b\\c&d}\pmatrix{x\\y} =x^2+y^2\tag{2a} $$
Now, for (1) I get
$$ \left( \begin{array}{cc} a^2+c^2 & a b+c d \\ a b+c d & b^2+d^2 \\ \end{array} \right)=\left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right)\tag{1b} $$
and for (2) I get
$$ (a x+b y)^2+(c x+d y)^2=x^2+y^2 \tag{2b} $$
For (1) I clearly get the orthogonal group $O^TO=I$.
But for (2), using Mathematica:
Solve[(a x+b y)^2+(c x+d y)^2==x^2+y^2]
I get:
$$ \left\{\left\{d\to \frac{-\sqrt{-a^2 x^2 y^2-2 a b x y^3-b^2 y^4+x^2 y^2+y^4}-c x y}{y^2}\right\},\left\{d\to \frac{\sqrt{-a^2 x^2 y^2-2 a b x y^3-b^2 y^4+x^2 y^2+y^4}-c x y}{y^2}\right\},\left\{a\to -\sqrt{1-c^2},y\to 0\right\},\left\{a\to \sqrt{1-c^2},y\to 0\right\},\{x\to 0,y\to 0\}\right\} $$
which is anything but. So why (1) and (2) give me different results?
I don't see that anyone has written out $$ (a x+b y)^2+(c x+d y)^2=x^2+y^2 \tag{2b} $$
$$ a^2 x^2 + 2abxy + b^2 y^2 + c^2 x^2 + 2cdxy + d^2 y^2 = x^2 + y^2 $$ for all $x,y,$ which means the coefficients agree. $$ (a^2 +c^2) x^2 + (2ab+2cd)xy + (b^2 + d^2) y^2 = x^2 + y^2 = 1 x^2 + 0 xy + 1 y^2 $$
$$ a^2 + c^2 = 1 \; , \; \; 2(ab+cd) = 0\; , \; \; b^2 + d^2 = 1 $$
So your $$ \left( \begin{array}{cc} a & b \\ c & d \\ \end{array} \right) $$ has two unit vectors as columns, and these columns are orthogonal to each other. It is an orthogonal matrix.