How to perform an axial symmetry according to any line in the Cartesian plane? If we have a point $P (x, y)$. I know that an axial symmetry with respect to the axis of the ordinates will result in the homologous point $(-x, y)$. In addition, an axial symmetry with respect to the axis of the absicas will result in a homologous point $(x, -y)$
The problem is that I do not know how to do it when it is a straight line, without having to draw.
Specifically, I have an exercise in which I must make an axial symmetry at a point $K$ of coordinates $(3, -1)$ with respect to a line $L$ that bisects the $1st$ and $3rd$ quadrants.
When bisected, it means that this line has an angle of $45 °$ with respect to the horizontal.
From here I do not know how to continue, I would appreciate a general help for this type of exercises, thanks in advance.
 A: HINT
Let consider the transformation for $(1,0)$ and $(0,1)$ then observe that
$$(3,-1)=3\cdot (1,0)-1\cdot (0,1)$$
and use linearity, that is
$$T(a\vec v+b\vec w)=aT(\vec v)+bT(\vec w)$$
A: General solution:  
Let $l: y=ax+b$ be an arbitrary line in the Cartesian plane, and assume there exists a point $P(x,y)$. We want to find a point $Q(u,v)$ which is axial symmetry according to $l$. 
(In specific situation, we know the exact value of $x,y,a,b$, and we want to know $u,v$.) 
$PQ$ is perpendicular to $l$. Hence, 
$$ \frac{y-v}{x-u} \times a = -1.$$
Thus $v$ can be expressed by $u$. 
A point $R(0,b)$ is on the line $l$. And we know that $PR = QR$.  Thus, 
$$ x^2 + (y-b)^2 = u^2 + (v-b)^2.$$
From this equation, we can find exact value of $v$ and $u$. 
Done. 
A: Let K' be the orthogonal projection of point K on the line L, and K" be the symmetric of K with respect to the same line L (aka reflexion point).
First step: K' is the point of intersection of line L and a line perpendicular to L passing through K.
Second step: Since K' is the midpoint of the segment KK", $(x_{K"},y_{K"})= 2(x_{K'},y_{K'})-(x_{K},y_{K})$
