$$ \begin{array}{l}x^{\prime}=a x+b y \\ y^{\prime}=c x+d y\end{array} $$

如果我们可以把变换写成这样一种形式,矩阵乘以输入坐标等于输出坐标,这样可以叫做线性变换。

$$ \left[\begin{array}{l}x^{\prime} \\ y^{\prime}\end{array}\right]=\left[\begin{array}{ll}a & b \\ c & d\end{array}\right]\left[\begin{array}{l}x \\ y\end{array}\right] $$

$$ \mathbf{x}^{\prime}=\mathbf{M} \mathbf{x} $$

Scale Matrix

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7980791e-d4d5-459e-92a7-dc873238b93d/Untitled.png

$$ \begin{array}{l}x^{\prime}=s x \\ y^{\prime}=s y\end{array} $$

其变换矩阵:

$$ \left[\begin{array}{l}x^{\prime} \\ y^{\prime}\end{array}\right]=\left[\begin{array}{ll}s & 0 \\ 0 & s\end{array}\right]\left[\begin{array}{l}x \\ y\end{array}\right] $$

Scale (Non-Uniform)

x y 可以不均匀地缩放

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/bf5e9ed4-c0cc-4b1e-8871-918810c0295b/Untitled.png

$$ \left[\begin{array}{l}x^{\prime} \\ y^{\prime}\end{array}\right]=\left[\begin{array}{ll}s_{x} & 0 \\ 0 & s_{y}\end{array}\right]\left[\begin{array}{l}x \\ y\end{array}\right] $$

Reflection Matrix

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0019d9e0-5276-4fdb-8959-113624c42c51/Untitled.png

Horizontal reflection:

$$ \begin{array}{l}x^{\prime}=-x \\ y^{\prime}=y\end{array} $$

$$ \left[\begin{array}{l}x^{\prime} \\ y^{\prime}\end{array}\right]=\left[\begin{array}{cc}-1 & 0 \\ 0 & 1\end{array}\right]\left[\begin{array}{l}x \\ y\end{array}\right] $$