Reflection of point over line with absolute value

functionsgeometry

Consider a point $(p,q)$ in $\mathbb{R}^2$. I'm interested in reflecting this point over the line $x+y+10=0$, for example. I know from the formula for the reflection of a point over a line that the reflected point has coordinate $\left(-q-10, -p-10\right)$. However, I'm only interested in reflecting points such that $p+q+10<0$, so all points $(p,q)$ such that $p+q+10\geq 0$ remain $(p,q)$. Is there a way to represent this $\mathbb{R}^2 \to \mathbb{R}^2$ mapping with only absolute values and without cases?

Best Answer

$$ \pmatrix{p \\ q}\mapsto \pmatrix{ \displaystyle{|p+q+10|+p-q-10\over2} \\ \displaystyle{|p+q+10|-p+q-10\over2}} $$