# Trouble understanding ij-element of a matrix

Let $\;f:\mathbb R^n \rightarrow \mathbb R^m\;$ and $\;G:\mathbb R^m \rightarrow \mathbb R_{+}\;$ and consider the $\;n\times n\;$ tensor $\;\mathcal A=(a_{ij})_{1\le i,j \le n}\;$ where $\;a_{ij}=f_{x_i} \cdot f_{x_j} -{\delta}_{ij}(\frac{1}{2} {\vert \nabla f \vert}^2+G(f))\;$

NOTE: $\; \cdot \;$stands for the Euclidean inner product and $\;\vert \cdot \vert\;$ is the Frobenius Norm of the matrix.

I want to prove that the entries of this tensor will be like:

$\; a_{11}=(f_{x_1})^2-1(\frac{1}{2} (f_{x_1})^2+\dots+\frac{1}{2}(f_{x_n})^2+G(f))\;$, $\;a_{12}=f_{x_1} \cdot f_{x_2}\;$, etc.

My attempt:

Since $\; \nabla f =(\frac{\partial f_i}{\partial x_j})_{1\le i \le m, 1\le j \le n}\;$, I computed the Frobenius norm of $\; \nabla f\;$ and I found $\;\frac{1}{2} {\vert \nabla f \vert}^2=\frac{1}{2} (f^1_{x_1})^2+\dots+\frac{1}{2}(f^1_{x_n})^2+\dots+\frac{1}{2}(f^m_{x_1})^2+\dots+\frac{1}{2}(f^m_{x_n})^2\;$ where $\;f^i_{x_j}=\frac{\partial f_i}{\partial x_j}\;$.

In addition, I know $\;{\delta}_{ij}=\begin{cases} 1\;if\;i = j\\ 0\;if\;i\neq j\\ \end{cases}\;$ Writing down all the above, I get:

• $\;a_{11}=(f_{x_1})^2-1(\frac{1}{2} (f^1_{x_1})^2+\dots+\frac{1}{2}(f^1_{x_n})^2+\dots+\frac{1}{2}(f^m_{x_1})^2+\dots+\frac{1}{2}(f^m_{x_n})^2+G(f))\;$
• $\;a_{12}=f_{x_1} \cdot f_{x_2}\;$
• etc.

My question:

I think I'm missing something but I don't know what! Are the above calculations right or wrong?

Any help would be valuable because I've been stuck here for days...

Yes it is correct. This is what the author meant. Note that the matrix $\mathcal A$ can also be written in more compact form as

$$\mathcal A = ff^T - (\frac 12 \left |\nabla f\right| + G(f))I$$

where $I$ is the identity matrix

• First of all, thanks a lot for your quick answer! I cannot see why $\;\mathcal A\;$ can be written in the form you suggested. I don't understand why $\;ff^T\;$ follows from $\;\frac {\partial f}{\partial x_i}\cdot\frac {\partial f}{\partial x_j}\;$ Commented Aug 22, 2017 at 11:10
• @kaithkolesidou Oh I am sorry, I thought $f_{x_i}$ just meant the $i$-th element and not the $i$-th partial derivative. The issue with the latter notation is : partial derivative of which component? That is, writing $f_{x_i}$ suggest you are indexing a vector (since you are using only one index). But the collection of the partial derivatives of the vector $f$ is a matrix (and you write it out correctly when computing the frobenius norm) , so this is a little confusing. Could you clarify it? :)
– Ant
Commented Aug 22, 2017 at 11:20
• @kaithkolesidou My point was that in general a matrix in the form $a_{i,j} = f_i f_j$ (where $f$ is a vector, being indexed by a single index) can be written as $$a = ff^T$$
– Ant
Commented Aug 22, 2017 at 11:22
• well, you shouldn't be sorry! I should have been more specific...This exactly is my problem here. Since $\;f\;$ is a matrix, what does $\;f_{x_i}\;$ stand for? I think I'll ask my professor..However, you've been very helpful!:) Commented Aug 22, 2017 at 11:32
• @kaithkolesidou you're welcome! :)
– Ant
Commented Aug 22, 2017 at 12:08