Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Excel spreadsheet with the following formula (paraphrased):

=MMULT(  MMULT(vector_as_n_column_matrix, n_by_n_square_matrix)  

the matrix and vector contain floating point values. Excel evaluates this formula as a scalar. I don't recall matrix math working that way. However, it's been over 30 years since I studies linear algebra.

Does it make sense that the result should be a scalar? Can you explain why in terms of linear algebra?

share|cite|improve this question
up vote 5 down vote accepted

Multiplying an $m\times n$ matrix on the right by an $n\times p$ matrix yields an $m\times p$ matrix. You have $$v^t Av$$ which is a $1\times n$ matrix times an $n\times n$ matrix times an $n\times 1$ matrix. The result is a $1\times 1$ matrix.

share|cite|improve this answer

working from right to left : A $n\times n$ matrix times a $1 \times n$ vector yields a $1 \times n$ vector (given that they are of the same size). Your first $1\times n$ vector times this resultant vector yields a scalar [via the dot product] (again pending that the two vectors have the same dimension), so yes your answer makes sense .

share|cite|improve this answer

Just to expand on what's already been said, given an $n\times n$ matrix $A\in M_{n\times n}(K)$, you can define the map $f:K^n\rightarrow K$ by $f_A(v)=v^\intercal A v$. These types of map are called bilinear forms (closely related: quadratic forms). Bilinear forms appear all over mathematics.

share|cite|improve this answer
Thanks. I found the link on bilinear forms to be an interesting read. – marfarma Dec 28 '12 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.