Dot product notation

11.2k Views Asked by At

Let $\mathbf{A=(a_1,a_2,\ldots, a_n)}$ and $\mathbf{B=(b_1,b_2,\ldots,b_n)}$. Many linear algebra books and texts define the dot product as $$ \mathbf{A\cdot B^T=a_1b_1+a_2b_2+\cdots+a_nb_n} $$ where $\mathbf{B^T}$ is the transpose of row vector $\mathbf{B}$. But Serge Lang in Linear Algebra define as $$ \mathbf{A\cdot B=a_1b_1+a_2b_2+\cdots+a_nb_n} $$ There is no diference between the results. But which is more correct and why?

EDIT

As Cameron Williams said, $\mathbf{A\cdot B^T}$ is implied by matrix multiplication. So I correct a part of my question:

Many linear algebra books and texts define the dot product as matrix multiplication $$ \mathbf{A B^T=a_1b_1+a_2b_2+\cdots+a_nb_n} $$

2

There are 2 best solutions below

0
On

Really, there isn't a notation that is more correct. It is just a matter of convention. All of them mean the operation $\sum_{i = 1}^n a_ib_i$. The important thing is that you understand what you must do. Like you said yourself, in $\mathbf{A \cdot B^T}$, we see $\mathbf{A}$ and $\mathbf{B}$ as row vectors. The $\mathbf{^T}$ serves just to remind you that you can see the dot product as a matrix multiplication, after all, we will have a $1 \times n$ matrix times a $n \times 1$, which is well defined, and gives as result a $1 \times 1$ matrix, i.e., a number.

The notation $\mathbf{A \cdot B}$ doesn't sugest any of these things, and you can think directly of the termwise multiplication, then sum.

In Linear Algebra, we often talk about inner products in arbitrary vector spaces, a sort of generalization of the dot product. Given vectors $\mathbf{A}$ and $\mathbf{B}$, a widely used notation is $\langle \mathbf{A}, \mathbf{B} \rangle$. An inner product (in a real vector space), put simply, is a symmetric bilinear form (form means that the result is a number), which is positive definite. That means:

i) $\langle \mathbf{A}, \mathbf{B} \rangle=\langle \mathbf{B}, \mathbf{A} \rangle $;

ii) $\langle \mathbf{A} + \lambda \mathbf{B}, \mathbf{C} \rangle = \langle \mathbf{A}, \mathbf{C} \rangle + \lambda \langle \mathbf{B}, \mathbf{C} \rangle$ ;

iii) $\langle \mathbf{A}, \mathbf{A} \rangle > 0 $ if $\mathbf{A} \neq \mathbf{0}$

I, particularly, don't like the notation $\mathbf{A \cdot B^T}$, because when working in more general spaces than $\Bbb R^n$, we don't always have a finite dimension, so matrices don't work so well. I never saw a notation different from those three I talked about. But I enforce what I said at the beginning: there isn't a correct notation, but you should be used to all of them, as possible.

0
On

To phrase CameronWilliams's comments another way, you can simply define the dot product as a matrix multiplication:

$$\mathbf a \cdot \mathbf b := \mathbf a^T \mathbf b$$

where $\mathbf a = [a_1, \ldots, a_n]^T$ and $\mathbf b = [b_1, \ldots, b_n]^T$ are column vectors. (If they are row vectors, the dot product would be $\mathbf a \cdot \mathbf b^T$, but as Cameron says, this is less standard.) To combine the dot product and transpose in the definition itself is confusing. If I saw $\mathbf a \cdot \mathbf b^T$, I would assume that $\mathbf a$ was a column vector and $\mathbf b$ was a row vector.

Incidentally, in terms of notation, I think it is nicer to reserve bold type ($\mathbf a$) for matrices and vectors, and italic type ($a$) for their entries. This provides a visual advantage to the reader, so that it is easy to see at a glance that, for example, $\mathbf A = [\mathbf a_1, \ldots, \mathbf a_n]$ is a matrix consisting of column vectors, whereas $\mathbf a = [a_1, \ldots, a_n]^T$ is a column vector with (say) real entries.