N variables Quadratic Form matrix operations proof

68 Views Asked by At

I have to show that if I start in a quadratic form of $n$ variables:

$f (x_1, ..., x_n) = \sum_{i=1}^n a_{i}x_{i}^2 + \sum_{(j<i, j=2)}^n a_{ij}x_{i}x_{j} \quad = \quad \textbf{x}^T\cdot\textbf{A}\cdot\textbf{x}$

and prove that $A\in \mathbb{R}^{n\cdot n}$ is a symmetric matrix with diagonal elements given by $a_i$ and non-diagonal elements given by $a_{ij} / 2$.

I already know why $A$ is symmetric and how is people customary to represent it, but how can I come from my general expression $f (x_1, ..., x_n) $ to the representation of $\textbf{x}^T\cdot\textbf{A}\cdot\textbf{x}$ and also show the diagonal elements of the matrix.

1

There are 1 best solutions below

1
On BEST ANSWER

Welcome to Math.Stackexchamge!

We can work out $\bf{x}^{\it{T}}\cdot A\cdot x$:

For Matrices $\bf C,D$: $$\left(\bf C\cdot D\right)_{i}=\sum_{l=1}^{n}C_{\it jl}\cdot D_{li}$$ Then: $$\left(\bf x^{T}\cdot A\right)_{i}=\sum_{m=1}^{n}x_{m}\cdot a_{ml}$$ Or: $$\left(\bf{x}^{\it{T}}\cdot A\cdot x\right)=\sum_{m=1}^n\sum_{l=1}^nx_{m}a_{ml}x_{l}$$

Now: break up the sum into where $m=l$ and $m\neq l$, and let $a_{ii}=a_i:$ $$\sum_{m=1}^n\sum_{l=1}^nx_{m}a_{ml}x_{l}=\sum_{m=1}^{n}a_{m}x_{m}^{2}+\sum_{m\neq l}^{n}a_{ml}x_{m}x_{l}$$

We can rewrite the second-half as the second term in the expression you gave.