# Dot product and vectors

1. Nov 14, 2007

### baokhuyen

1. The problem statement, all variables and given/known data
I get confused with this problems
show that the vector (orth of b onto a) = (b - proj of b onto a) is orthogonal to a.

2. Relevant equations

3. The attempt at a solution
(b-proj of b onto a) dot a = 0
and I got stuck!

2. Nov 14, 2007

### matt grime

Perhaps if you wrote out what "proj of b onto a" was in vector terms it would become easier.

3. Nov 14, 2007

### baokhuyen

For example, I say:
(b- a(a.b)/a^2).a=0
(b-(a.b)/a).a=0
a.b-a.((a.b)/a)=0
How can I do next?

4. Nov 14, 2007

### HallsofIvy

Staff Emeritus
You are not being careful to distinguish between vectors and numbers. The first "a" of "a(a.b)/a^2" is a vector while "a^2" is a number- the square of the length of a. You are trying to cancel them!

with the result that you get this, which makes no sense! Does "(a.b)/a" mean you are dividing by a vector?

$$\left(\vec{b}- \frac{\vec{a}\cdot\vec{b}}{|a|^2}\vec{a}\right)\cdot\vec{a}$$
$$\vec{b}\cdot\vec{a}- \frac{\vec{a}\cdot\vec{b}}{|a|^2}(\vec{a}\cdot\vec{a})$$
Now, what is that equal to?