# Degrees of freedom in a Homography matrix

Homograpy transformation maps a point in one plane into a point in another plane, $$\begin{pmatrix}x'\\ y'\\ 1\end{pmatrix} = H_{3\times 3}\begin{pmatrix}x\\ y\\ 1\end{pmatrix},$$ where the points $$X'$$ and $$X$$ are represented using homogeneous coordinates.

It is said that matrix $$H$$ is defined up to scale and its degree of freedom is 8. I understand that if $$H$$ is up to scale, then $$dof(H) = 8$$, but why $$H$$ is defined up to scale?

UPDATE

Affine transformation is $$\begin{pmatrix}x'\\ y'\\ 1\end{pmatrix} = Ax = \begin{pmatrix}a_1 &a_2 &a_3\\ a_4 &a_5 &a_6\\ 0 &0 &1\end{pmatrix}\begin{pmatrix}x\\ y\\ 1\end{pmatrix},$$ why is $$dof(A)$$ 6?

When we use homogeneous coordinates, if a point $P$ in a plane is represented by a vector $x = [x_1, x_2, x_3]^T$, then any non-zero scalar multiple of $x$ also represents the same point $P$.
If $H$ represents a homography, and $Hx = y$, then $(cH)x = cy$. And $cy$ represents the same point as $y$. This shows that $cH$ represents the same homography as $H$. (Assuming $c \neq 0$.)
• I update my post, according to your answer, affine transformation matrix should have $5$ degree of freedom, but it doesn't. Sep 29, 2013 at 11:01
• One way to look at it is that, when we use homogeneous coordinates, an affine transformation is represented by a matrix of the form $\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ 0 & 0 & a_{33} \end{bmatrix}$ where $a_{33} \neq 0$. This matrix has $7$ non-zeros entries, but any nonzero scalar multiple of it represents the same affine transformation. So there are $6$ degrees of freedom for the affine transformation. Sep 29, 2013 at 21:12
• I feel the last line in this statement is that some element of $H$ will have non-zero value $k$, and so by letting $c=\frac{1}{k}$, then $cH$ will have a given value constant at $1$, hence why you have $9-1=8$ degrees of freedom. May 2, 2023 at 3:45