I was studying a finite dimensional toy model in quantum field theory. Now I need some help from mathematicians.
I am interested in this degenerate bilinear form
$$S(x^{1},x^{2},\cdots,x^{n})\equiv\begin{pmatrix} x^{1} & x^{2} & \cdots & x^{n} \end{pmatrix}\begin{pmatrix} 1 & 1 & \cdots & 1 \\ 1 & 1 & \cdots & 1 \\ \vdots & \vdots & & \vdots \\ 1 & 1 & \cdots & 1 \end{pmatrix}\begin{pmatrix} x^{1} \\ x^{2} \\ \vdots \\ x^{n} \end{pmatrix}=(x^{1}+x^{2}+\cdots+x^{n})^{2}$$
Obviously, the square matrix of $S$ has zero eigenvectors. For convenience, I denote the above bilinear form in a compact form:
$$S(\mathbf{x})=\mathbf{x}^{T}\cdot\mathbf{S}\cdot\mathbf{x},$$
where $\mathbf{x}\in\mathbb{R}^{n}$. Then, if $\mathbf{v}\in\mathbb{R}^{n}$ is a zero eigenvector of $\mathbf{S}$, one also has
$$S(\mathbf{x}+\mathbf{v})=S(\mathbf{x}).$$
The matrix $\mathbf{S}$ has eigenvalues $\lambda_{1}=n$, $\lambda_{2}=0$, $\cdots$, $\lambda_{n-1}=0$, $\lambda_{n}=0$, and eigenvectors
\begin{align} v_{1}=\begin{pmatrix} 1 \\ 1 \\ 1 \\ 1 \\ \vdots \\ 1 \\ 1 \\ 1 \\ \end{pmatrix},\quad v_{2}&=\begin{pmatrix} -1 \\ 0 \\ 0 \\ 0 \\ \vdots \\ 0 \\ 0 \\ 1 \end{pmatrix},\quad v_{3}=\begin{pmatrix} -1 \\ 0 \\ 0 \\ 0 \\ \vdots \\ 0 \\ 1 \\ 0 \end{pmatrix},\quad\cdots \\ v_{n-1}&=\begin{pmatrix} -1 \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \\ 0 \\ 0 \end{pmatrix},\quad v_{n}=\begin{pmatrix} -1 \\ 1 \\ 0 \\ 0 \\ \vdots \\ 0 \\ 0 \\ 0 \end{pmatrix}. \end{align}
Therefore, the matrix $\mathbf{S}$ can be diagonalized via the transformation
$$\mathbf{S}=\mathbf{G}\cdot\mathbf{D}\cdot\mathbf{G}^{-1},$$
where
$$\mathbf{D}=\begin{pmatrix} 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & 0 \\ \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & n \end{pmatrix},\quad\mathrm{and}\quad\mathbf{G}=\begin{pmatrix} -1 & -1 & -1 & \cdots & -1 & -1 & 1 \\ 0 & 0 & 0 & \cdots & 0 & 1 & 1 \\ 0 & 0 & 0 & \cdots & 1 & 0 & 1 \\ \vdots & \vdots & \vdots & & \vdots & \vdots & \vdots \\ 0 & 0 & 1 & \cdots & 0 & 0 & 1 \\ 0 & 1 & 0 & \cdots & 0 & 0 & 1 \\ 1 & 0 & 0 & \cdots & 0 & 0 & 1 \end{pmatrix}.$$
Suppose $\mathbf{v}$ is linked with $\mathbf{x}$ via some linear transformation $\mathbf{g}\in\mathrm{M}_{n\times n}(\mathbb{R})$, i.e. $\mathbf{v}=\mathbf{g}\cdot\mathbf{x}$, do the collection of all such $\mathbf{g}$ form an algebra? If it does, what is this algebra?
My motivation of this question is the following:
The transformation $\mathbf{x}\rightarrow\mathbf{x}+\mathbf{v}$ is a finite dimensional analog of infinitesimal gauge transformations in quantum field theory, and the matrix $\mathbf{g}$ is an analog of the Lie algebra of the gauge group.