# Simple question about the dot product

1. Apr 12, 2013

### cocopops12

The definition of the dot product is given by
A = <a1,b1>
B = <a2,b2>
A dot B = a1a2 + b1b2

Is this definition valid for orthogonal coordinates only?

2. Apr 12, 2013

### mahrap

I believe this definition should hold true for any vectors as long as they're both in $$ℝ^n$$. You cannot however take the dot product of two vectors if one is in $$ℝ^n$$ and the other is in $$ℝ^m$$ where $$n≠m$$.

3. Apr 13, 2013

### HallsofIvy

Staff Emeritus
The more general concept is the "inner product". An inner product is a function, <u, v>, that maps pairs of vectors to to members of the underlying field (typically real or complex numbers) such that
1) <au, v>= a<u, v>
2) <u+ v, w>= <u, w>+ <v, w>
3) <u, v>= <v, u>* where the "*" is the complex conjugate (so if the field is the real numbers, <u, v>= <v, u>.

We then define two vectors to be orthogonal (perpendicular) if and only if their inner product is 0.

Given any inner product on a vector space, it is always possible to choose a basis so that the inner product of two vectors is just the sum of the products of corresponding components in that basis. In that case, yes, the basis vectors not only orthogonal, they are "orthonormal"- the inner product of a basis vector with itself is 1.

4. Apr 13, 2013

### Fredrik

Staff Emeritus
You should think of the dot product as a function from $\mathbb R^2\times\mathbb R^2$ into $\mathbb R^2$, not as something that involves coordinates.

The definition tells you that $x\cdot y=x_1y_1+x_2y_2$ where $x_1,x_2,y_1,y_2$ are defined by $x=(x_1,x_2), y=(y_1,y_2)$. If you use polar coordinates for example, i.e. if you define $r_1,r_2,\theta_1,\theta_2$ by $x=r_1(\cos\theta_1,\sin\theta_1)$ and $y=r_2(\cos\theta_1,\sin\theta_1)$, then clearly $x\cdot y\neq r_1r_2+\theta_1\theta_2$ (except perhaps for some very special choice of x and y). What we have instead is $$x\cdot y=r_1 r_2\cos(\theta_2-\theta_1).$$

5. Apr 13, 2013

### Infrared

That definition is only valid for orthonormal (even stricter than orthogonal) basis vectors. Suppose I want to dot two vectors $\vec{A}= a\vec{e_1}+b\vec{e_2 }$ and $\vec{B}=c\vec{e_1}+d\vec{e_2}$. Then since the dot product is distributive, $\vec{A} \cdot \vec{B} = (a\vec{e_1}+b\vec{e_2 }) \cdot (c\vec{e_1}+d\vec{e_2}) = ac( \vec{e_1} \cdot \vec{e_1}) + ad(\vec{e_1} \cdot \vec{e_2}) + bc(\vec{e_2} \cdot \vec{e_1}) + bd (\vec{e_2} \cdot \vec{e_2}) = ac( \vec{e_1} \cdot \vec{e_1}) + (ad+ bc)(\vec{e_1} \cdot \vec{e_2}) + bd (\vec{e_2} \cdot \vec{e_2})$

Note that a basis vector dotted with itself is not necessarily one and that the dot product of two different basis vectors is not necessarily zero. In the case that they are (and then you have an orthonormal basis), this formula reduces to the familiar formula you quoted.

Last edited: Apr 13, 2013
6. Apr 14, 2013

### Fredrik

Staff Emeritus
Just a latex tip:
\begin{align}
a &= b = c\\
&= d = e = f
\end{align} Hit the quote button to see how I to I did this.

7. Apr 14, 2013

### Infrared

Thanks, sorry to anyone that had to scroll because of me .

8. Apr 16, 2013

### HallsofIvy

Staff Emeritus
You can also avoid those large spaces by using "itex" and "\itex" rather than "" and "".
(I added the space so the \$ would show up.)

9. Apr 16, 2013

### Fredrik

Staff Emeritus
He was using itex.

10. Apr 16, 2013

### Infrared

Yes, I'm just bad at spacing.