The transpose of a matrix
Before describing the dot product in matrix notation, we briefly digress to make sure you know what the transpose of a matrix is.
We can transpose a matrix by switching its rows with its columns. We denote the transpose of matrix A by AT. For example, if
A = ![]() |
| AT = |
Since an n-dimensional vector x is represented by an n x 1 column matrix,
| x = |
| xT = |
The dot product as matrix multiplication
Given the rules of matrix multiplication, the product of a 1 x n matrix with an n x 1 matrix is a 1 x 1 matrix, i.e., a scalar. So if we multiply xT (a 1 x n matrix) with any n-dimensional vector y (viewed as an n x 1 matrix), we end up with a matrix multiplication equivalent to the familiar dot product of x . y:
| xTy = |