Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

=MMULT(  MMULT(vector_as_n_column_matrix, n_by_n_square_matrix)  
        ,TRANSPOSE(vector_as_n_column_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|improve this question

3 Answers 3

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|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|improve this answer
    
Thanks. I found the link on bilinear forms to be an interesting read. –  marfarma Dec 28 '12 at 22:21

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|improve this answer

Your Answer

 
discard

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.