# Representation of a matrix (tensor)

Let us consider the following $$2 \times 2$$ matrix, $$A$$. $$A = \begin{bmatrix} w_1^TP_{11}w_1 & w_1^TP_{12}w_2 \\ w_2^TP_{21}w_1 & w_2^TP_{22}w_2 \end{bmatrix}$$ where $$P_{ij}$$'s are $$n\times n$$ matrices and $$w_j \in \mathbb{R}^n$$'s are column vectors. Note that $$w_i^TP_{ij}w_j \in \mathbb{R}$$.

Let $$W = [w_1, w_2]$$. It seems that $$A$$ can be represented by $$W$$ along with another matrix involving $$P_{ij}$$. I am thinking to represent $$A$$ such that $$W^TMW$$ for some $$M$$. But it seems that it is impossible to present in that manner. I think the notion of the tensor product could help here, but not entirely sure.

Let $$\boldsymbol 0 \in \mathbb R^n$$. Then\begin{align} A &= \begin{bmatrix} w_1^{\mathrm T} P_{11} w_1 & w_1^{\mathrm T} P_{12} w_2 \\ w_2^{\mathrm T} P_{21} w_1 & w_2^{\mathrm T} P_{22} w_2 \end{bmatrix} \\ &= \begin{bmatrix} w_1^{\mathrm T} \big[\begin{matrix} P_{11} w_1 & P_{12} w_2 \end{matrix}\big] \\ w_2^{\mathrm T} \big[\begin{matrix} P_{21} w_1 & P_{22} w_2 \end{matrix}\big] \end{bmatrix} \\ &= \begin{bmatrix} w_1^{\mathrm T} & \boldsymbol 0^{\mathrm T} \\ \boldsymbol 0^{\mathrm T} & w_2^{\mathrm T} \end{bmatrix} \begin{bmatrix} P_{11} w_1 & P_{12} w_2 \\ P_{21} w_1 & P_{22} w_2 \end{bmatrix} \\ &= \begin{bmatrix} w_1 & \boldsymbol 0 \\ \boldsymbol 0 & w_2 \end{bmatrix}^{\mathrm T} \begin{bmatrix} \begin{bmatrix} P_{11} \\ P_{21} \end{bmatrix} w_1 & \begin{bmatrix} P_{12} \\ P_{22} \end{bmatrix} w_2 \end{bmatrix} \\ &= \begin{bmatrix} w_1 & \boldsymbol 0 \\ \boldsymbol 0 & w_2 \end{bmatrix}^{\mathrm T} \begin{bmatrix} P_{11} & P_{12} \\ P_{21} & P_{22} \end{bmatrix} \begin{bmatrix} w_1 & \boldsymbol 0 \\ \boldsymbol 0 & w_2 \end{bmatrix} \\ &= W^{\mathrm T} M W. \end{align}
So that $$W = \begin{bmatrix} w_1 & \boldsymbol 0 \\ \boldsymbol 0 & w_2 \end{bmatrix} %= \big[\begin{matrix} w_1 & w_2 \end{matrix}\big] \begin{bmatrix} 1&0\\0&1 \end{bmatrix} ; \quad M = \begin{bmatrix} P_{11} & P_{12} \\ P_{21} & P_{22} \end{bmatrix}.$$
• Wait, $[w_1, w_2] \in \mathbb{R}^{n \times2 }$ and thus the size of $[w_1, w_2]I_{2\times 2}$ is $n \times 2$. However, $W$ is of size $2n\times 2$... – induction601 Mar 8 at 17:44
• Never mind the $\displaystyle \big[\begin{matrix} w_1 & w_2 \end{matrix}\big] \begin{bmatrix} 1&0\\0&1 \end{bmatrix}$, then. Sorry, I was trying to build $W$ using $[w_1, w_2]$. – Rócherz Mar 8 at 17:55