# Need help following through the matrix calculus in this paper

I've been making my way through this paper:

Three-dimensional surface curvature estimation using quadric surface patches

Specifically appendix 1 on pages 12-13, the part at the top of page 13:

On differentiating with respect to $u_{\gamma \delta}$:

$$\sum_{x,y,z \in N} x_{\gamma} x_{\delta} \sum_{\alpha\leq\beta} x_{\alpha}u_{\alpha\beta}x_{\beta} - \lambda u_{\gamma\delta} = 0$$

How does differentiating by $u_{\gamma \delta}$ yield $x_{\gamma} x_{\delta}$?

Afterwards, why is $\sum_{x,y,z \in N} x_{\gamma} x_{\delta} x_{\alpha} x_{\beta}$ a 10x10 matrix?

This might be some notation confusion, still, I would appreciate links and explanation of the theory and identities the author is using.

The function they are taking the derivative of is

$$f = \sum_{x,y,z\in \mathbb{N}}\left(\sum_{\alpha\leq \beta} x_\alpha u_{\alpha \beta}x_\beta\right)^2 + \lambda \left(1 - \sum_{\alpha \leq \beta}u_{\alpha\beta}^2\right) \tag{1}$$

So the minimum is found by setting $\partial f/\partial u_{\gamma \delta} = 0$. To do that just note that

$$\frac{\partial u_{\alpha\beta}}{\partial u_{\gamma\delta}} = \delta_{\alpha \gamma}\delta_{\beta\delta} \tag{2}$$

Taking this into account we get

\begin{eqnarray} \frac{\partial f}{\partial u_{\gamma \delta}} &=& 2\sum_{x,y,z\in \mathbb{N}} \left(\sum_{\alpha\leq \beta} x_\alpha u_{\alpha \beta}x_\beta\right) \left(\sum_{\alpha\leq \beta}x_\alpha\color{blue}{\frac{\partial u_{\alpha\beta}}{\partial u_{\gamma \delta}}}x_\beta\right) - 2\lambda\sum_{\alpha \leq \beta}u_{\alpha\beta} \color{red}{\frac{\partial u_{\alpha \beta}}{\partial u_{\gamma \delta}}} \\ &\stackrel{(2)}{=}&2\sum_{x,y,z\in \mathbb{N}} \left(\sum_{\alpha\leq \beta} x_\alpha u_{\alpha \beta}x_\beta\right) \left(\sum_{\alpha\leq \beta}x_\alpha\color{blue}{\delta_{\alpha\gamma}\delta_{\beta\delta}}x_\beta\right) - 2\lambda\sum_{\alpha \leq \beta}u_{\alpha\beta} \color{red}{\delta_{\alpha\gamma}\delta_{\beta\delta}} \\ &=&2\sum_{x,y,z\in \mathbb{N}} \left(\sum_{\alpha\leq \beta} x_\alpha u_{\alpha \beta}x_\beta\right) \left(x_\gamma x_\delta\right) - 2\lambda u_{\gamma \delta} \end{eqnarray}

Rearranging you then have

$$\sum_{\alpha \leq \beta}\left(\sum_{x,y,z\in\mathbb{N}} x_\gamma x_\delta x_\alpha x_\beta\right) u_{\alpha\beta} = \lambda u_{\gamma\delta} \tag{3}$$

As for the second question, note that in $u_{\alpha\beta}$ you must satisfy $\alpha\leq \beta$, so that means that $u_{12}$ is allowed, but $u_{21}$ is not. If you count all possible combinations you end up with 10

• Hey, thanks! I understand now. What is the identity at (2) called? Also, one final question: how come the sum at (3) equals $D^TD$, where D is the design matrix? (top of page 13) Commented May 24, 2018 at 13:24
• @coderella The symbol $\delta_{ij}$ is Kronecker delta, it means $1$ if $i=j$ and $0$ otherwise, which is just what you need when you are calculating partial derivatives of coordinates w.r.t to the same coordinates. As an example $$\frac{\partial x_1}{\partial x_1} = 1 ~~~ \frac{\partial x_1}{\partial x_2} = 0 ~~~ \frac{\partial x_1}{\partial x_3} = 0$$ These three expressions can be summarized in $$\frac{\partial x_1}{\partial x_j} = \delta_{1j}$$ Commented May 24, 2018 at 13:45