# Defining an affine transformation from 4 points

I have a rectangle which is transformed into another one by an affine transformation:

$$\begin{bmatrix}x \\ y\end{bmatrix} \mapsto \begin{bmatrix}m_1 & m_2 \\ m_3 & m_4\end{bmatrix} \cdot\begin{bmatrix}x \\ y\end{bmatrix} +\begin{bmatrix}t_x \\ t_y\end{bmatrix}$$

I want to determine this transformation. However, I have 4 points and 6 unknowns. Is there any condition I can fix to reduce the number of unknowns? (like, for instance, no reflection?)

How would that translate?