For example given $(x,y,z,t) = xy+ y^2+ yz+z^2+zt$
How do i represent it as a sum and difference of squares (i.e. in the form $\sum a_iA_i^2$) and how do i find its trace?
Or if i have a quadratic form given with the matrix \begin{bmatrix}0 & a & b \\ a & 0 & c \\ b & c & 0 \end{bmatrix} how do i find the signature of the quadratic form?
The solution of the first one is (2,2) and the second one has mutliple cases but i am not sure of the process.
Thanks in advance!
Every quadratic form corresponds to at least one matrix $A$ such that $$q(\mathbf{x},\mathbf{y}) = \mathbf{x}^TA\mathbf{y}$$ (with uniqueness if $A$ is taken to be symmetric). The trace of the quadratic form is the just the trace of that matrix. If $\mathbf{x} = (x_1,x_2,\ldots,x_n)$, then we can expand $\mathbf{x}^TA\mathbf{y}$ in the form
$$q(\mathbf{x},\mathbf{y}) = \sum_{i=1}^n\sum_{j=1}^n A_{ij}x_iy_j.$$
Now the trace of a matrix $A$ is simply the sum of its diagonal elements. From our form for $q(\mathbf{x},\mathbf{y})$ we can find those diagonal elements by considering the vector $\mathbf{x^{(k)}}$ with $x^{(k)}_i = \delta_{ik}$ for $k \in \{1,2,\ldots,n\}$ where $\delta_{ik}$ is the Kronecker delta. Taking $q(\mathbf{x}^{(k)},\mathbf{x}^{(k)}) = A_{kk}$. Sum these to find the trace.