Why Is a Matrix Transpose Times Itself a Scalar?
At a glance
- 1. Check the dimensions
For an m by n matrix A, A transpose times A has size n by n.
- 2. Recognize the vector case
If A is a column vector, its transpose times itself is a 1 by 1 matrix, identified with a scalar.
- 3. Compute the entries
Each entry of A transpose A is the dot product of a pair of columns of A.
- 4. Distinguish the norm
The sum of squared entries is the trace of A transpose A, not generally the matrix itself.
The product of a matrix and its transpose is not always a scalar. The key is the matrix’s shape: a vector is a special kind of matrix, and the product of a vector with its transpose can be a scalar depending on whether the vector is written as a column or a row.
For a general matrix, is a square matrix. Its entries are dot products between the columns of . The distinction also explains why the scalar length-squared of a matrix is usually written as a trace or a sum of squares.
Check the dimensions first
If has rows and columns, then its transpose has rows and columns. Matrix multiplication gives
So the product is an -by- matrix. It is literally a scalar only when , meaning that has one column. A 1-by-1 matrix is conventionally identified with its single entry, a scalar.
Why the vector case gives a scalar
Write a column vector as
Then is a row vector, so the product has size -by-:
That sum is the dot product of with itself, also written , and equals the squared Euclidean length .
For example, if
The length of is therefore .
What happens for a general matrix
Let have columns . Then
Each entry is a scalar dot product, but all the entries together form an -by- matrix. This is called the Gram matrix of the columns of . Its diagonal entries are the squared lengths of the columns; its off-diagonal entries measure how the columns pair with one another.
For a concrete example, take
Its columns are and . Their dot products are , , and . Thus
which is a matrix, not a scalar. The individual entries are scalars, but the product itself has four entries.
A related scalar: the sum of squared entries
For a real matrix , the trace of is a scalar:
This is the squared Frobenius norm, . In the example above, it is , also the sum . This scalar is not the same thing as the matrix .
Common mistakes
- Ignoring the shape of a vector. A column vector gives scalar . A row vector gives scalar . Reversing either product gives a matrix: or .
- Calling every entry the whole product. The entries of are scalars, but for a matrix with multiple columns, the full product is still a matrix.
- Confusing a scalar matrix with a scalar. In special cases, for a scalar . The left side is still an -by- matrix; it is a scalar multiple of the identity. This occurs when the columns of are mutually orthogonal and all have the same length.
- Using transpose for complex vectors. For complex entries, the corresponding inner product uses the conjugate transpose , not just . Then is a Gram matrix, and for a column vector , .
When in doubt, check the dimensions before interpreting the product: they tell you whether the result is a scalar, a vector, or a matrix.
References
- Linear Algebra and Its Applications
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.