What role does the last element of a 3D homogenous vector have? If I have the following vector { x, y, z, w }, what role does w have in calculations such as dot product, cross product, vector addition / subtraction, etc. I'm just a bit confused as to whether it should be included in calculations or not.
 A: Real projective $3$-space $P^3$ is the space of all real quadruples ${\bf p}=(x,y,z,w)\ne(0,0,0,0)$ modulo the equivalence relation $${\bf p}\sim{\bf p}'\quad\Leftrightarrow\quad {\bf p'}=\lambda{\bf p}\quad {\rm for\ some} \ \lambda\ne0\ .$$
In this space there is no such thing as addition, scalar product, or vector product, but the notions of line and plane, the intersecting of two planes, or a line and a plane, make sense.
If you are working in ordinary $(x,y,z)$-space $R^3$  of three dimensions, for certain problems it makes sense to immerse $R^3$ into $P^3$ by means of the map
$$\psi:\quad(x,y,z)\mapsto (x,y,z,1)/_\sim\ .$$
This means that your working space $R^3$ is interpreted as hyperplane $w=1$ in $R^4$, and the point $(x,y,z)$ is mapped onto the equivalence class of $(x,y,z,1)$, i.e., the ray in $R^4$ containing all points $\lambda(x,y,z,1)$, $\ \lambda\ne0$.
Now $\psi(R^3)$ is not all of $P^3$: Points of the form $(x,y,z,0)/_\sim\in P^3$ are not attained by $\psi$. These points of $P^3$ correspond to "points at infinity" of ordinary $R^3$. Historically the whole setup has the exact reason to enable the correct handling of these "points at infinity".
When you are given a point $\hat{\bf p}\in P^3$ by its homogeneous coordinates $(x,y,z,w)$, i.e., if $\hat{\bf p}=(x',y',z',w)/_\sim$, and if $w\ne0$ then you can get back the corresponding point $(x,y,z)=\psi^{-1}(\hat{\bf p})$ in your working space $R^3$ by means of
$$x={x'\over w},\quad y={y'\over w},\quad z={z'\over w}\ .$$
A: The set of $n$-tuples of a given set $S$ is denoted by $S^n$. 
The homogeneous coordinates of the 3d projective space are $4$-tuples of real numbers, (not all of them are zero), i.e. elements of $\Bbb R^4\setminus\{(0,0,0,0)\}$.
If $P=(x,y,z,w)$ is a $4$-tuple of real numbers, then it represents the following point of the projective space:


*

*If $w\ne 0$, then the ordinary point with coordinates $\big(\displaystyle\frac xw,\frac yw,\frac zw \big)$.

*If $w=0$, then an ideal point (pt in the infinity) "lying" in (the end of both directions of) all the lines in the ordinary 3d Euclidean space which have direction vector $(x,y,z)$.


We have addition and multiplication by scalar in $\Bbb R^4$, equally including all $4$ coordinates, and is very useful, but it doesn't give back the addition of ordinary vectors of the Euclidean 3d space! (Basically because, $\lambda x$ represents the same point as $x\in\Bbb R^4$.)
