# reflect a point over another point using matrix transformation

We know that if we want to reflect any point over an origin, i.e. $$O\left(0, 0\right)$$, we can use matrix transformation like this $$\left(\begin{matrix}x' \\ y'\end{matrix}\right) = \left(\begin{matrix}-1 & 0 \\ 0 & -1\end{matrix}\right)\left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}-x \\ -y\end{matrix}\right).$$ But, what if we reflect any point over another point $$M\left(a, b\right)$$ with $$a, b \ne 0$$?

This would not generally be a linear transformation since $$(0,0)$$ would not map to itself via a reflection over a non-origin point. So you will not be able to do this with a single matrix multiplication.
For example, to translate $$(x,y)$$ over $$(5,7)$$, I would do
$$\left(\begin{array}{c} x' \\ y' \end{array}\right)=\left(\begin{array}{c} x-5 \\ y-7 \end{array}\right)\left(\begin{array}{cc} -1&0 \\0&-1 \end{array}\right)+ \left(\begin{array}{c} 5 \\ 7 \end{array}\right)$$