# Addition of homogeneous vectors with different w component

If I have two homogeneous vectors say $v_1 = (x_1, y_1, z_1, w_1)$ and $v_2 = (x_2, y_2, z_2, w_2)$, then is their addition defined if $w_1 \ne w_2$? If $w_1 = w_2 = w$, then I can simply do $v_1 + v_2 = (x_1+x_2, y_1+y_2, z_1+z_2, w)$, but I am having trouble with interpreting result when $w_1 \ne w_2$.

*Edit:*If v1{5, 1, 2, 1} and v2{3, 3, 6, 1} are two homogeneous vectors then correct addition is add{8, 4, 8, 1} and not {8, 4, 8, 2}, which will be equivalent to {4, 2, 4, 1} in 3D space. It makes sense to define such operations on homogeneous 3D vectors when w1=w2 but I guess when w1 != w2 such operations are undefined but I am not sure so I am wondering if anyone can shed some light on it and confirm if my assumption is correct

-
There is no general meaning to adding two 'homogeneous vectors', so you need to provide more context. What are you actually trying to do? – Rhys Apr 29 '13 at 16:08
I am working on writing a geometric kernel library in c++ and I was working on Vector classes. I realized that I need to treat 4D vectors different than 3D Vectors represented in their homogeneous form {x, y, z, w} and bumped into problem of defining addition of two homogeneous vectors with different w component. – Prasad Dixit Apr 29 '13 at 16:42

It cannot be done in a well-defined manner in general.

For, consider the two homogeneous vectors $(0:0:0:1)$ and $(1:0:0:0)$ in $\Bbb P^3(F)$.

Any well-defined manner of associating to these a sum should be invariant under changing representatives, which are $(0:0:0:\lambda)$ and $(\nu:0:0:0)$. The "obvious" option $(1:0:0:1)$ actually corresponds to only one possible element in the span $(\lambda:0:0:\nu): \lambda,\nu \in F$.

If we go back to our intuition about projective space, we see that a "homogeneous coordinate" is actually not but a one-dimensional subspace of the underlying vector space $\Bbb A^4(F)$. Any operation of "adding" these should be expected to result in a two-dimensional subspace: the span written down above.

The reason why the addition works if we have two vectors with the same component non-zero (say the last), is that we can effectively "pretend" we are in $\Bbb A^3(F)$ by the mapping $(x:y:z:w) \mapsto \left(\frac xw,\frac yw, \frac zw\right)$; this is called an affine chart.

For further information, see the Projective space lemma on Wikipedia; investigation of projective space in this context falls under the subject algebraic geometry.

-