Dot product is not a matrix product of a row and column vector (so no transpose required). Plato's approach is correct and it is the approach that is expected (Your inner product is not a "dot" product as required by the question. You are assuming more knowledge on the part of the OP and so what you post is probably gobbledygook to them)
CB