Home Algorithms Commercialization Data Science Information Theories Quantum Theories Lab Linear Algebra
<< Kronecker Product PDF Matrix Types and Properties >>

$\require{cancel} \newcommand{\Ket}[1]{\left|{#1}\right\rangle} \newcommand{\Bra}[1]{\left\langle{#1}\right|} \newcommand{\Braket}[1]{\left\langle{#1}\right\rangle} \newcommand{\Rsr}[1]{\frac{1}{\sqrt{#1}}} \newcommand{\RSR}[1]{1/\sqrt{#1}} \newcommand{\Verti}{\rvert} \newcommand{\HAT}[1]{\hat{\,#1~}} \DeclareMathOperator{\Tr}{Tr}$

Matrix Pulled Apart

First created in July 2018

Element by Element

Let $A=[a_{ij}],$ where $a_{ij}$ is the element in the $i^\mathrm{th}$ row and the $j^\mathrm{th}$ column of the $n\times n$ matrix $A$.

Also let $\Ket k$ be the column vector with the $k^\mathrm{th}$ element being 1 and the rest zero. $\{\Ket k\}$ is an orthonormal basis of $\mathbb{C}^n$. ($\Ket k$ is also called the $k^\mathrm{th}$ canonical basis vector for the $n$-dimensional space.)

This means for an arbitrary matrix $M$ (not necessarily square), $M\Ket j$ will pick out the $j^\mathrm{th}$ column of $M$, and $\Bra i M$ will pick out the $i^\mathrm{th}$ row of $M$.

As a result, $\Braket{i\Verti A\Verti j}$ will pick out the $i^\mathrm{th}$ row of the $j^\mathrm{th}$ column of $A$: $\boxed{ \Braket{i\Verti A\Verti j} =[a_{ij}] }.$

Also, $\boxed{A\Ket q\Bra p A^\dagger=[a_{iq}a_{pj}]}$ is the outer product of the $q^\mathrm{th}$ column and the $p^\mathrm{th}$ row of $A.$

Therefore, $\Ket q\Bra p=[\delta_{iq}\delta_{pj}],$ which is a matrix with a 1 at $q^\mathrm{th}$ row and $p^\mathrm{th}$ column, and 0 for the rest.

Flattening


This section is yet to be verified on the order of $\alpha$ and $\beta$ inside $\operatorname{vec}(\Ket\beta\Ket\alpha),$ which is the result of being column major.


The "flattening" of $\Ket\alpha\Bra\beta$ means to map it to $\Ket\alpha\Ket\beta$, also written as $\Ket\alpha\otimes\Ket\beta$ or simply $\Ket{\alpha\beta}.$


Technically, it is vectorisation, defined as $\operatorname{vec}(\Ket\beta\Bra\alpha):=\Ket{\alpha\beta}.$

$\mathrm{RHS} =\Ket\alpha\otimes\Ket\beta=[\alpha_1\beta_1,\alpha_1\beta_2,\ldots,\alpha_2\beta_1,\ldots,\alpha_n\beta_n]^T .$

$\mathrm{LHS} =\operatorname{vec}\left( \begin{bmatrix} \beta_1\alpha_1&\beta_1\alpha_2&\ldots&\beta_1\alpha_n\\ \beta_2\alpha_1&\beta_2\alpha_2&\ldots&\beta_1\alpha_n\\ \vdots&\vdots&\ddots&\vdots\\ \beta_n\alpha_1&\beta_n\alpha_2&\ldots&\beta_n\alpha_n\\ \end{bmatrix} \right) =[\beta_1\alpha_1,\beta_2\alpha_1,\ldots,\beta_1\alpha_2,\ldots,\beta_n\alpha_n] =\mathrm{RHS} .$


In terms of canonical basis vectors, while $\Ket i\Bra j$ is a matrix with 1 in its $i^\mathrm{th}$ row and $j^\mathrm{th}$ column and 0 in the rest, $\Ket{ij}$ is a tall $n^2\times 1$ column vector with its $\left(n(j-1)+i\right)^\mathrm{th}$ element being 1 and the rest being 0.

Matrix Multiplication with Individual Elements

$M =\begin{bmatrix}a_1&b_1\\c_1&d_1\end{bmatrix} \begin{bmatrix}a_2&b_2\\c_2&d_2\end{bmatrix} =\begin{bmatrix}a_1a_2+b_1c_2&a_1b_2+b_1d_2\\c_1a_2+d_1c_2&c_1b_2+d_1d_2\end{bmatrix} .$

$M =\begin{bmatrix}\begin{pmatrix}a_1\\c_1\end{pmatrix}&\begin{pmatrix}b_1\\d_1\end{pmatrix}\end{bmatrix} \begin{bmatrix}a_2&b_2\\c_2&d_2\end{bmatrix} =\begin{bmatrix} \begin{pmatrix}a_1\\c_1\end{pmatrix}a_2+\begin{pmatrix}b_1\\d_1\end{pmatrix}c_2& \begin{pmatrix}a_1\\c_1\end{pmatrix}b_2+\begin{pmatrix}b_1\\d_1\end{pmatrix}d_2 \end{bmatrix} =\begin{bmatrix} \begin{pmatrix}a_1a_2+b_1c_2\\c_1a_2+d_1c_2\end{pmatrix}& \begin{pmatrix}a_1b_2+b_1d_2\\c_1b_2+d_1d_2\end{pmatrix} \end{bmatrix} .$

$M =\begin{bmatrix}a_1&b_1\\c_1&d_1\end{bmatrix} \begin{bmatrix}\begin{pmatrix}a_2&b_2\end{pmatrix}\\\begin{pmatrix}c_2&d_2\end{pmatrix}\end{bmatrix} =\begin{bmatrix} a_1\begin{pmatrix}a_2&b_2\end{pmatrix}\\+b_1\begin{pmatrix}c_2&d_2\end{pmatrix}\\\\ c_1\begin{pmatrix}a_2&b_2\end{pmatrix}\\+d_1\begin{pmatrix}c_2&d_2\end{pmatrix} \end{bmatrix} =\begin{bmatrix} \begin{pmatrix}a_1a_2+b_1c_2&a_1b_2+b_1d_2\end{pmatrix}\\ \begin{pmatrix}c_1a_2+d_1c_2&c_1b_2+d_1d_2\end{pmatrix} \end{bmatrix} .$

$M= \begin{bmatrix}\begin{pmatrix}a_1\\c_1\end{pmatrix}&\begin{pmatrix}b_1\\d_1\end{pmatrix}\end{bmatrix} \begin{bmatrix}\begin{pmatrix}a_2&b_2\end{pmatrix}\\\begin{pmatrix}c_2&d_2\end{pmatrix}\end{bmatrix} =\begin{pmatrix}a_1\\c_1\end{pmatrix}\begin{pmatrix}a_2&b_2\end{pmatrix} +\begin{pmatrix}b_1\\d_1\end{pmatrix}\begin{pmatrix}c_2&d_2\end{pmatrix} =\begin{bmatrix}a_1a_2&a_1b2\\c_1a_2&c_1b_2\end{bmatrix} +\begin{bmatrix}b_1c_2&b_1d2\\d_1c_2&d_1d_2\end{bmatrix} .$

Note: The above can be generalised to $\begin{bmatrix} \Ket{\psi_1}~\Ket{\psi_2}~\ldots~\Ket{\psi_n} \end{bmatrix} \begin{bmatrix} \Bra{\phi_1}\\\Bra{\phi_2}\\\vdots\\\Bra{\phi_n} \end{bmatrix} =\sum_{k=1}^n\Ket{\psi_k}\Bra{\phi_k} ,$

which is different from $\left(\sum_{i=1}^n\Ket{\psi_i}\right)\left(\sum_{j=1}^n\Bra{\phi_j}\right) =\sum_{i,j=1}^n\Ket{\psi_i}\Bra{\psi_j} .$ (This does not make much physical sense.)

Multi-Column-Vector Matrix Multiplication

$M=\{\Ket{\psi_1},\Ket{\psi_2},\ldots,\Ket{\psi_n}\} =\sum_{k=1}^n\Ket{\psi_k}\Bra{I_k}$ and $N=\{\Ket{\phi_1},\Ket{\phi_2},\ldots,\Ket{\phi_n}\} =\sum_{k=1}^n\Ket{\phi_k}\Bra{I_k}$,
where $\Bra{I_k}$ is the $k^\mathrm{th}$ row of the $n\times n$ identity matrix $I$.

$M^\dagger=\sum_{k=1}^n\Ket{I_k}\Bra{\psi_k}$ and $N^\dagger=\sum_{k=1}^n\Ket{I_k}\Bra{\phi_k}$, where $\Ket{I_k}$ is the $k^\mathrm{th}$ column of the $n\times n$ identity matrix $I$.

$MN^\dagger=\left(\sum_i\Ket{\psi_i}\Bra{I_i}\right)\left(\sum_j\Ket{I_j}\Bra{\phi_j}\right) =\sum_k\Ket{\psi_k}\Bra{\phi_k} .$

Notes:

  1. Only multiply corresponding columns between $M$ and $N$, not all combinations. i.e. Only $n$ multiplications, not $n^2$.

  2. There is no need for orthonormality between $\Ket{\psi_i}$ and $\Bra{\phi_j}$. The $\Braket{I_i\Verti I_j}$ will take care of it when $i\ne j$.

  3. We use $\Ket{I_k}$ and $\Bra{I_k}$ here to mean rows and columns of $I$, instead of using $\Ket k$ and $\Bra k$ as in some text, because the latter notation generally means a basis vector, not necessarily contained in $I$.

 

<< Kronecker Product Top Matrix Types and Properties >>