# Outer Product Intution [duplicate]

Please, help me understand this statement. The outer product notation for matrices also gives an intuitive input-output relation for them. For instance, the matrix |0⟩ ⟨1| + |1⟩ ⟨0| can be read as "output 0 when given a 1 and output 1 when given a 0".

• A related answer. Oct 15 '20 at 18:12

$$|0\rangle\langle 1| = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \begin{pmatrix} 0 & 1 \end{pmatrix}= \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}$$ and similarly
$$|1\rangle\langle 0| = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \begin{pmatrix} 1 & 0 \end{pmatrix}= \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}$$ and therefore $$X = |0\rangle\langle 1| + |1\rangle\langle 0| = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$$
Thus you can see that $$X|0\rangle = |1\rangle$$ and $$X|1\rangle = |0\rangle$$. So giving the input is the state $$|0\rangle$$ then the output is the state $$|1\rangle$$ and vice versa.