Given a square matrix$J$ (representing a bilinear form) over a commutative ring$k$, a $J$-orthogonal matrix is any square matrix $A$ of the same size over $k$ such that

Most often one considers a case when $J$ is diagonal. For $J = 1$ one recovers the notion of an orthogonal matrix.

All J-orthogonal matrices over the ground field$k$ form an algebraic group denoted $SO_J(n, k)$ or $SO(n,k; J)$ or alike; in real or complex case a Lie group. The matrices in the Lie algebra are J-skew-symmetric, $A^T J + J A = 0$.