# $O(p,q)$ as transformations that conserve quadratic form

Let us try to define $$O(p,q)$$ in two different ways, which I want to show their equivalence.

1. 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$$.

2. 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?

OP's two definitions of the indefinite orthogonal group$$^1$$ $$O(p,q;\mathbb{F})$$ are equivalent, which can be proven with the help of a polarization identity.
$$^1$$ Here $$\mathbb{F}$$ is a field with characteristic different from 2.