Re-scaling a vector along a direction

49 Views Asked by At

I have a vector $a \in \mathbb{R}^n$ that has the following decomposition:

$$ a = a_1 + a_o $$

where $a_1$ represents the component of $a$ along vector $b \in \mathbb{R}^n$ and $a_o$ is the remainder, i.e., $a - a_1$.

I would like to remove from $a$, some component of $a$ along the direction $b$, i.e.,

$$ a - \gamma . \text{proj}_b (a) $$

for some $\gamma > 0$ using the defn of projection from rmm93's answer. However, when I set $\gamma = 1$, the results were the same as with $a$. So, I am not sure what I might be missing here.

2

There are 2 best solutions below

2
On

From you equation $\bar a_1^T b = \frac{a_1^T b}{\gamma}$ I read that you want to set $$ \bar a_1 = \frac{1}{\gamma} a_1. $$ Since $a_1 = \operatorname{proj}_b(a)$ this does indeed yield $$ \bar a_1 = \frac{1}{\gamma} \operatorname{proj}_b(a). $$

I'm not sure if that's all you are asking for. If it isn't, please clarify in your question.

2
On

Yes, the projection of $a$ onto $b$ is as follows.

$$a_1 = \frac{b^T a}{b^T b} b$$

Hence, if you want to scale $a_1$ by $\gamma$, that would just be

$$\bar{a}_1 = \frac{1}{\gamma} \frac{b^T a}{b^T b} b$$