logo

Formula for Matrix Power Form 📂Matrix Algebra

Formula for Matrix Power Form

Formula

For the matrix $X = [x_{ij}] \in \mathbb{R}^{n \times n}$, the following holds.

$$ [XX]_{ij} = \sum_{k=1}^{n} x_{ik} x_{kj} $$

$$ XX = X^{2} = \begin{bmatrix} \sum\limits_{k=1}^{n} x_{1k} x_{k1} & \cdots & \sum\limits_{k=1}^{n} x_{1k} x_{kn} \\ \vdots & \ddots & \vdots \\ \sum\limits_{k=1}^{n} x_{nk} x_{k1} & \cdots & \sum\limits_{k=1}^{n} x_{nk} x_{kn} \end{bmatrix} $$

If $X$ is a symmetric matrix,

$$ X^{2} = \begin{bmatrix} \sum\limits_{k=1}^{n} (x_{1k})^{2} & \cdots & \sum\limits_{k=1}^{n} x_{1k} x_{kn} \\ \vdots & \ddots & \vdots \\ \sum\limits_{k=1}^{n} x_{nk} x_{k1} & \cdots & \sum\limits_{k=1}^{n} (x_{nk})^{2} \end{bmatrix} $$

Generalization

The following holds.

$$ XXX = X^{3} = \begin{bmatrix} \sum\limits_{k,\ell=1}^{n}x_{1k}x_{k\ell}x_{\ell 1} & \cdots & \sum\limits_{k,\ell=1}^{n}x_{1k}x_{k\ell}x_{\ell n} \\ \vdots & \ddots & \vdots \\ \sum\limits_{k,\ell=1}^{n}x_{nk}x_{k\ell}x_{\ell 1} & \cdots & \sum\limits_{k,\ell=1}^{n}x_{nk}x_{k\ell}x_{\ell n} \end{bmatrix} $$

Regarding the set $K = \left\{ k_{1}, k_{2}, \dots, k_{|K|} \right\}$, the following holds.

$$ X^{|K|} = \begin{bmatrix} \sum\limits_{K} x_{1k_{1}}x_{k_{1}k_{2}}\cdots x_{k_{|K|}1} & \cdots & \sum\limits_{K} x_{1k_{1}}x_{k_{1}k_{2}}\cdots x_{k_{|K|}n} \\ \vdots & \ddots & \vdots \\ \sum\limits_{K} x_{nk_{1}}x_{k_{1}k_{2}}\cdots x_{k_{|K|}1} & \cdots & \sum\limits_{K} x_{nk_{1}}x_{k_{1}k_{2}}\cdots x_{k_{|K|}n} \end{bmatrix} $$

Explanation

The formula is valid not only for powers of a single matrix but also for products of multiple matrices. Additionally, if a transpose is included, the order of the indices of the matrix should be reversed. For example, for the $n \times n$matrix $A, B, C$,

$$ \begin{align*} [AB]_{ij} &= \left[ \sum_{k} a_{ik}b_{kj}\right] \\[1em] [AB^{\mathsf{T}}]_{ij} &= \left[ \sum_{k} a_{ik}b_{jk}\right] \\[1em] [ABC]_{ij} &= \left[ \sum_{k,s} a_{ik}b_{ks}c_{sj}\right] \\[1em] [AB^{\mathsf{T}}C]_{ij} &= \left[ \sum_{k,s} a_{ik}b_{sk}c_{sj}\right] \end{align*} $$

Proof

It can be derived through simple calculations. The same can be verified for the power form as well.

$$ XX = \begin{bmatrix} x_{11} & x_{12} & \cdots & x_{1n} \\ x_{21} & x_{22} & \cdots & x_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n1} & x_{n2} & \cdots & x_{nn} \end{bmatrix} \begin{bmatrix} x_{11} & x_{12} & \cdots & x_{1n} \\ x_{21} & x_{22} & \cdots & x_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n1} & x_{n2} & \cdots & x_{nn} \end{bmatrix} $$

$$ \implies \begin{align*} [XX]_{11} &= x_{11} x_{11} + x_{12} x_{21} + \cdots + x_{1n} x_{n1} = \sum\limits_{k} x_{1k} x_{k1} \\ [XX]_{12} &= x_{11} x_{12} + x_{12} x_{22} + \cdots + x_{1n} x_{n2} = \sum\limits_{k} x_{1k} x_{k2} \\ & \vdots \\ [XX]_{nn} &= x_{n1} x_{1n} + x_{n2} x_{2n} + \cdots + x_{nn} x_{nn} = \sum\limits_{k} x_{nk} x_{kn} \end{align*} $$

$$ \implies XX = \begin{bmatrix} \sum\limits_{k} x_{1k} x_{k1} & \cdots & \sum\limits_{k} x_{1k} x_{kn} \\ \vdots & \ddots & \vdots \\ \sum\limits_{k} x_{nk} x_{k1} & \cdots & \sum\limits_{k} x_{nk} x_{kn} \end{bmatrix} $$