The first one. I jumped straight to the component-wise formula. TA expected to see the matrix you wrote above (except AFAIR transposed, but I might recall wrong).
I understand why TA didn't like it, though back then I wasn't happy that my short and "obvious" solution wasn't received well.
I understand why TA didn't like it, though back then I wasn't happy that my short and "obvious" solution wasn't received well.