Your teacher made a mistake. The order of multiplication matters. AB is not the same as BA in matrix multiplication.
Matrix D is 2 x 2 while matrix n is 1 x 2. A vector is a special case of a matrix.
Notice how the inner dimensions marked in bold do not match up
This would mean the matrix product
is not possible.
I have a feeling your teacher meant to say
instead of

Swap the two sets of matrix dimensions to notice the inner values in bold matching up
This match tells us that
is possible.
We'll apply the dot product of n with the first column of D to get:
-2*(-3) + (-1)*4 = 2
This result goes in the first box.
Apply the dot product of n with the second column of D to get:
-2*0 + (-1)*1 = -1
This is the result of the second box.
Therefore,
