# When getting the outer product representation w.r.t an input and output basis, what matrix is $\langle w_{j}|A|v_{i}\rangle$ actually in?

If $$A:V\to W$$, where $$|v_{i}\rangle$$ is an orthonormal basis for $$V$$ and $$|w_{j}\rangle$$ is an orthonormal basis for $$W$$, then $$A=I_{W}AI_{V} = \sum_{ij}|w_{j}\rangle\langle w_{j}|A|v_{i}\rangle\langle v_{i}| = \sum_{ij}\langle w_{j}|A|v_{i}\rangle|w_{i}\rangle\langle v_{i}|$$.

However, N&C states that $$\langle w_{j}|A|v_{i}\rangle$$ is an entry in the matrix of $$A$$ in row $$i$$ column $$j$$. But for $$A=\frac{1}{\sqrt{2}}\begin{bmatrix}1 &1 \\ 1 & -1\end{bmatrix}$$ and $$V$$ being the computational basis and $$W$$ the hadamard, I do not understand how this gives rise to the correct matrix. Doing the above only gives two matrix entries $$\langle0|A|+\rangle |0\rangle\langle +|$$ and $$\langle1|A|-\rangle |1\rangle\langle -|$$.

Now if I expand those I regain A, but that is not what N&C states. So is there something I am missing here, or is all what they are saying is that $$\langle w_{j}|A|v_{i}\rangle$$ is just $$an$$ entry, and not that taking it w.r.t these input and output basis will give you all entries? If not, then what matrix is $$\langle w_{j}|A|v_{i}\rangle$$ meant to be an entry of.

Recall that a matrix only represents a linear transformation with respect to some underlying pair of bases. $$\langle w_{j}|A|v_{i}\rangle$$ gives you the $$(i,j)$$ entry of the matrix $$M$$ where $$M$$ represents the same transformation as $$A$$ but with respect to the selected bases $$|w_j\rangle$$ and $$|v_i\rangle$$.
Perhaps your problem stems from the fact that in your example, you are interpreting the matrix $$A$$ with respect to the computational basis (in both domain and codomain) but you are hoping to use the Hadamard basis in the codomain when thinking about the inner product.
In your example, $$A$$ is the transformation $$|0\rangle \mapsto |+\rangle,|1\rangle \mapsto |-\rangle$$, so when you think about $$V$$ being equipped with the computational basis and $$W$$ with the Hadamard basis, the associated matrix $$M$$ that represents the transformation $$A$$ with the specified bases is just the two-by-two identity matrix, as it sends the first basis vector to the first basis vector and the second to the second.
• thank you for your reply. I believe my confusion stems from the difference between $A$ and $M$. $A$ is a linear transformation. It can be described by a matrix. $I_{W}AI_{V}$ is also $A$. But what I get above only give me 2 entries, so is that all the matrix has in terms of these two basis? Jul 29, 2020 at 16:23
• What about the $0, -$ and $1, +$ combinations? Jul 29, 2020 at 18:55
• But due to the mapping of $+ \to 0$ and $- \to 1$, shouldn't they go to zero due the orthogonality of 0 and 1? Jul 29, 2020 at 19:39
• So the matrix just represents the mapping from the $i^th$ basis vector to the $j^th$ basis vector, and since it has different input basis, of which one basis is mapped to the corresponding basis in the other, it just takes the identity? Can it be thought of in the manner than the column numbers and row numbers represent different basis? Jul 30, 2020 at 10:52