# Vectors and projections

1. Aug 8, 2011

### 0range

1. The problem statement, all variables and given/known data

If a=<3,-1> , find vector b such that $$comp_ab=2$$

2. Relevant equations
$$comp_ab=\frac{a.b}{|a|}$$

3. The attempt at a solution

Still not entirely sure$$comp_ab$$ is, exactly... is it C in the below?

Lost...

2. Aug 8, 2011

### HallsofIvy

Staff Emeritus
Do you understand that there is not a unique answer? The "projection of b on a" is the length of the "near side" of a lying along vector a while vector b is the hypotenuse. Given any angle for b, there exist some length that makes the projection 2.

In any case, you wrote a formula for the projection,
$$proj_a b= \frac{a\cdot b}{|a|}$$
but don't use it. If you write $b= <b_1, b_2>$ then that formula becomes
$$2= \frac{3b_1+ b_2}{\sqrt{10}}$$

That gives a single equation for b.

I have no idea what that $\sqrt{40}$ is supposed to be.

Also, it $a\cdot b= c\dot b$, it does NOT follow that $a= c$. Vectors do not cancel that way.

3. Aug 8, 2011

### 0range

Hi, thanks for taking the time to help. It's really appreciated.

Isn't it comp, and not proj? (This is what my book gives, at least.) I didn't use it because I don't really understand what it is, and what it is saying.

I'm not sure if I'll be able to type what I'm thinking without it being too confusing... but in the hopes that you can tell me if I've misunderstood, or whatever the case may be... if it is too confusing, I'll make a diagram when I get home from work and post it.

I was trying to go from the fact that given a vector a and vector b, there is an orthogonal that is $$b-proj_ab$$.

And $$proj_ab$$ is some constant C times a.

So, if you substitute Ca for $$proj_ab$$ you get $$(b-ca) . a = 0$$

and

$$a.b - ca . a = 0$$

$$a . b = ca . a$$

$$\frac{a . b}{a . a} = c$$

so $$proj_ab=\frac{a . b}{a . a}a$$

Is this wrong?

edit: Is there a better way to write dot products than just putting a decimal in?