# In the solution of exercise 2.2(on this site) how can we see the new form of the operator A, in the beginning of the answer.?

this is the question I am referring to

I am sorry to ask such a question, can someone explain how are we able to make the new form of the operator A.

Thank you, any help would be great!

• What do you mean by the new form? Do you mean the second example they provided in which they has a different input and output basis? Feb 20 at 17:01
• In the beginning the answer starts with a result, equating the operator A to sum of outer product of basis states, i don't understand how that happened! Feb 21 at 2:43
• Yeah I just assumed that was what you meant. Did my answer explain things? Feb 21 at 13:59
• I might be wrong, but stating that result is essentially the answer what remains is just tensor or matrix matrix multiplication. Can you explain that in baby steps? :) Thank you! Feb 27 at 7:42
• The matrix multiplication or the actioj of A? I'm not sure what part my answer didn't cover. Feb 28 at 11:47

If you mean how does the answer immediately state that $$A=|1\rangle \langle 0|+|0\rangle \langle 1|$$, the reason is because in the question, it tells us that $$A|0\rangle = |1\rangle$$ and $$A|1\rangle = |0\rangle$$
$$|1\rangle \langle 0|0\rangle = |1\rangle$$ and $$|0\rangle \langle 1|1\rangle=|0\rangle$$
$$IAI=\sum_{i}|i\rangle \langle i|A\sum_{j}|j\rangle \langle j|=\sum_{i,j}|i\rangle \langle j|\langle i|A|j\rangle$$