I have been given a proof for the weak maximum principle and I do not understand the logic in one of the steps.
Let $a_{ij}$ be syymetric then: $$Lv=\sum_{i,j=1}^N a_{ij}(x)\partial_{x_i}\partial_{x_j}+\sum_{i=1}^Nb_i(x)\partial_{x_i}v $$ Then in one step of the proof we have that $\nabla v(x_0)=0$ and the Hessian matrix $\nabla^2 v(x_0)$ is negative semi-definite. So we have: $$ Lv(x_0)=\sum_{i,j=1}^N a_{ij}(x_0)\partial_{x_i}\partial_{x_j}v(x_0) $$ But the part I do not understand is the following line:
$$ \sum_{i,j=1}^N a_{ij}(x_0)\partial_{x_i}\partial_{x_j}v(x_0)=Trace(a(x_0)\nabla^2(v(x_0)) $$
Any help with this would be greatly appreciated.
I've realised the expression is essentially the definition of trace of the multiplication of two matrices. Let $B=(b_{ij})$ and $C=(c_{ij})$ be two $n\times n$ matrices. Then: $$ Trace(AB)= \begin{matrix} b_{11}c_{11}+\dots+a_{n1}b_{n1}\\ \vdots \\ +b_{1n}c_{n1}+\dots+a_{nn}b_{nn} \end{matrix} =\sum_{i=1}^N \sum_{j=1}^N b_{ij} c_{ij} $$