# $(x, y, 1)$ is 2D homogenous coordinates or 3D homogenous coordinates?

We know that $$(x, y, 1)$$ are the homogenous coordinates of a 2D point $$(x, y)$$. $$(x, y, 1)$$ has 2 degrees of freedom. That's why we should call it 2D homogenous coordinates. But many websites say it's 3D homogenous coordinates.

My question is: What is right? $$(x, y, 1)$$ are 2D homogenous coordinates or 3D homogenous coordinates?

• It's 2D homogeneous coordinates. 3D homogeneous coordinates would be $(x,y,z,w)$. Nov 20, 2021 at 8:04
• Can you give a better context? Interpreting the meaning of a "vector" is allllll about how the values are being interpreted, and interpretation is alllll about context: Consider this vec4(1,3,2,1); Its a vector, no its a point, no its a plane, no its a quaternion, no its a bivector.... It's all those things, but which one makes sense? Well that is all about context. So asking if it some random vec3 is 2D or 3D without giving a context is pretty much meaningless. Nov 20, 2021 at 12:22

If you have $$(x,y,z) \in \mathbb{R}^3$$ and you relate it to $$(x/z, y/z) \in \mathbb{R}^2$$ then you have interpreted $$(x,y,z)$$ as one possible representation of the 2D vector $$(x/z, y/z)$$ in homogeneous coordinates. The special case of $$z=0$$ corresponds to "points at infinity" or directions. If you have $$(x,y,z,w) \in \mathbb{R}^4$$ and you relate it to $$(x/w,y/w,z/w) \in \mathbb{R}^3$$ then you have interpreted $$(x,y,z,w)$$ as one possible representation of the 3D vector $$(x/w, y/w, z/w)$$ in homogeneous coordinates. From this it becomes clear that to represent an $$N$$-dimensional point in homogeneous coordinates you need $$N+1$$ components.

To clarify what I mean by one possible representation, consider the following example:

$$(3,7) \equiv (3,7,1) \equiv (6,14,2),$$

where the second and third vectors are different representations of the same 2D vector in homogeneous coordinates. In general, if you have a 2D vector $$(X,Y)$$, then for any $$\lambda\ne 0$$, the vector $$(\lambda X, \lambda Y, \lambda)$$ is a representation of $$(X,Y)$$ in homogeneous coordinates. So you really get an equivalence class of points in $$N+1$$ dimensions corresponding to a specific point in $$N$$ dimensions. Notably this equivalence class forms a line through $$(0,0,0)$$ and $$(X,Y,1)$$ in the $$N+1$$ dimensional space.

• So (x, y) is 2D points and (x, y, 1) is It's 3D homogeneous coordinates? Nov 20, 2021 at 18:10
• @B-spline What is $A,B,C,D$ here, and what is the relation to the current question. If $(x,y)$ is a 2D point then $(x,y,1)$ is one possible version of it in homogeneous coordinates. But also $(2x,2y,2)$ is a version of it in homogeneous coordinates. For any $\lambda\ne 0$, $(\lambda x, \lambda y, \lambda)$ is a representation of $(x,y)$ in homogeneous coordinates. Nov 20, 2021 at 18:11
• So what we said the homogenous coordinates (x, y, 1) ? 2d or 3d? Nov 20, 2021 at 18:13
• @B-spline $(\lambda x, \lambda y,\lambda),\, \lambda \ne 0$ is in $\mathbb{R}^3$, while $(x, y)$ is in $\mathbb{R}^2$. However $(\lambda x, \lambda y, \lambda)$ are the homogeneous coordinates of $(x,y)$. Nov 20, 2021 at 18:15
• @B-spline $(x,y,1)$ is a 3D point and at the same time the representation of the 2D point $(x,y)$ in homogeneous coordinates. The two statements are not contradictory. It is however not the representation of a 3D point in homogeneous coordinates, since for that you would need a 4D point. Nov 20, 2021 at 18:21

I suppose in some respects it's a matter of perspective (no pun intended). The ordered triple $$(x,y,w)$$ is a point in a 3-dimensional projective space that is mapped (projected) to a 2-dimensional point in the Euclidean plane: $$(x/w, y/w).$$ Given that, $$(x,y,1)$$ would be 2-dimensional plane in that 3-dimensional space (or a specific point if $$x$$ and $$y$$ are fixed) that maps to $$(x,y)$$ in the standard Euclidean 2-dimensional plane.

• (x,y,1) is a projective plane points, so how it is points in 3d? Nov 19, 2021 at 22:13
• (x,y,1) has two degree of freedom,, so how it is 3d? Nov 19, 2021 at 22:21
• @B-spline: "(x,y,1) has two degree of freedom" It's not a function; it's a point in space. Points don't have "degrees of freedom"; they have coordinates. A point with 3 coordinates is said to be three dimensional. Nov 19, 2021 at 23:05
• @NicolBolas There's nothing wrong with calling $x,y$ degrees of freedom as long as they remain variables and are not constants. Nov 20, 2021 at 8:07
• @B-spline (x,y,1) is a projective plane points, so how it is points in 3d? To be more precise the triplet is an element of $\mathbb{R}^3$. If you're just given a triplet you cannot tell whether it's 2D homogeneous coordinates. If you know that the triplet $(x,y,z)$ is in homogeneous coordinates however, then you know that it corresponds to the point $(x/z, y/z)$ in 2D. Note that this also doesn't contradict the fact that $(x,y,z)$ is an element in $\mathbb{R}^3$ regardless of whether it's in 2D homogeneous coordinates or whether it's a typical 3D point/vector. Nov 20, 2021 at 13:57