1

I know that I can only multiply two matrices when the number of columns in the first matrix is equal to the number of rows in the second matrix

But when looking at the symbol site, it is possible to perform this matrix operation [180; -2450; -140] * [0.11; 0.35; 0.93] = -967.9

My question is: why can these two matrices be multiplied if the number of columns in the first matrix (1) is not the same as the number of rows (3) in the second matrix?

Daniel Fischer
  • 206,697

1 Answers1

1

It is definitely not the matrix product, but the scalar product (dot product):

$$180\cdot0.11 +(-2450)\cdot0.35 + (-14)\cdot0.93 = -967.9 $$ Instead of $u * v$ one usually writes $u \cdot v$, $(u,v)$ or $\langle u, v \rangle$. If you write $u, v$ as row vectors, you can express this as a matrix product via $$u \cdot v = u v^T$$ where $AB$ denotes the usual matrix product.

Paul Frost
  • 76,394
  • 12
  • 43
  • 125
  • thanks, but how do i know that i'm not supposed to make the product of the two matrices, but the scalar product between the matrices? –  Sep 29 '20 at 14:19
  • Because, as you say in your question, you can multiply two matrices only when the number of rows in the first matrix is equal to the number of columns in the second matrix. This shows that $[180; -2450; -140] * [0.11; 0.35; 0.93]$ cannot be matrix multplication, but must be something else. If you do not precisely define (or do not know) what $$ is, then you have to guess* what it could be. Here the guess is easy: The dot product is a standard "multiplication" for vectors in $\mathbb R^n$ which yields a real number. See my answer. – Paul Frost Sep 29 '20 at 15:25
  • thanks for the help –  Sep 29 '20 at 16:33