Let us try to define $O(p,q)$ in two different ways, which I want to show their equivalence.
Define the symmetric bilinear quadratic form $[\cdot ,\cdot]$ which is given by $$[x,y]=\langle x,gy\rangle$$ where $\langle \cdot,\cdot\rangle$ is the standard inner product on $\mathbb{R}^{p+q}$, and $x,y \in \mathbb{R}^{p+q}$ and $$g={\rm diag}(1,\cdots,1,-1, \cdots, -1)$$ with $p$ number of $1$s and $q$ number of $-1$s. Then define the $$O(p,q)=\{A\in \mathbb{R}^{n\times n} | [Ax,Ay]=[x,y], \ \forall x,y \in \mathbb{R}^n \}$$ where $n=p+q$.
Using the same quadratic form, define $$O(p,q)=\{A\in \mathbb{R}^{n} | [Ax,Ax]=[x,x], \ \forall x \in \mathbb{R}^n \}.$$
Both of them can be used to denote conserving the quadratic form. So my question is, are they equivalent or are they non-equivalent? If they are, how can we show that, and if they aren't, which one should we prefer?