Convert expression from index to matrix/vector notation

313 Views Asked by At

I am used to write lengthy expressions in index notation with the implied summation convention. Regrettably, I have convey my research to an audience which is more comfortable with the matrix/vector notation. For instance, I have to convert expressions like the following $\kappa_{r_1r_2}(\alpha)\kappa_{r_3r_4}(\alpha)\kappa_{r_2r_3r_4}(\alpha)$, where indices range in $1\ldots p$, $\alpha=\alpha_1,\ldots,\alpha_p$ and $\kappa_{r_1r_2r_3}(\alpha)=\partial \kappa_{r_1r_2}/\partial\alpha_{r_3}$. Clearly $\kappa_{r_1r_2}(\alpha)$ is just a matrix of order $p$ and we can just call it $K(\alpha)$. The problem is to handle the three dimensional array $\kappa_{r_1r_2r_3}(\alpha)$ and then to take care of the summation. Regarding $\kappa_{r_1r_2r_3}(\alpha)$, I was thinking to write it as a block diagonal matrix whose diagonal elements are $\partial K/\partial\alpha_{1}, \ldots, \partial K/\partial\alpha_{p}$, but I am not able to figure out if it is going to be of any help.

Do you have any hint and possibly a general rule to follow to convert the expression like the above (and even more complex) by using matrix/vector notation?