Rotate a line by a given angle about a point Given the coefficients of a line $A$ , $B$ and $C$.
$$ Ax + By + C = 0$$
I wish to rotate the line by angle say $\theta$ about a point $x_0$ and $y_0$ in clockwise  direction. How can I achieve this so that I get new coefficients then?
 A: Take a point on this line, say $$A=\binom{x}{\frac{-C-Ax}{B}}$$ multiply the coordinates of this point by the rotation-matrix defined by $$R_\theta=\bigg(\matrix{\cos\theta &&-\sin \theta \\\sin\theta && \cos\theta}\bigg)$$ Immediately you get $$A^\prime=\binom{x\cos\theta+\frac{C+Ax}{B}\sin\theta}{x\sin\theta-\frac{C+Ax}{B}\cos\theta}$$ which defines the equation of the rotated line (extract $y$ from it and proceed).
EDIT: Notice that $$A_x=x(\cos\theta+\frac A B \sin\theta)+\frac{C}{B}\sin\theta\Rightarrow x=\frac{A_x-\frac{C}{B}\sin\theta}{\cos\theta+\frac{A}{B}\sin\theta} \\ A_y=x(\sin\theta-\frac A B\cos\theta)-\frac C B\cos\theta \\ A_y=\frac{(A_x-\frac{C}{B}\sin\theta)(\sin\theta-\frac A B \cos\theta)}{\cos\theta+\frac{A}{B}\sin\theta}-\frac{C}{B}\cos\theta$$and from here I guess you can get $A_y$ in terms of $A_x$ and generalize to get the rotated plan equation.
A: In homogeneous coordinates, the (covariant) vector $\mathscr l=(A,B,C)$ corresponds to the line given by the equation $Ax+By+C=0$. If $M$ is a nonsingular projective transformation matrix, the transformed line is given by $\mathscr lM^{-1}$. Note that the line covector is right-multiplied by a matrix instead of left-multiplying as we would column vectors that represent points. Effectively, you’re setting $(x',y')=f(x,y)$, solving for $x$ and $y$ and substituting back into the equation of the line.  
A clockwise rotation by $\theta$ about an arbitrary point $(x_0,y_0)$ can be constructed by translating the origin to this point, rotating, and then translating back. The inverse of this transformation is a rotation in the opposite direction, so in this case $$M^{-1}=\begin{bmatrix}1&0&x_0\\0&1&y_0\\0&0&1\end{bmatrix}\begin{bmatrix}\cos\theta&-\sin\theta&0\\\sin\theta&\cos\theta&0\\0&0&1\end{bmatrix}\begin{bmatrix}1&0&-x_0\\0&1&-y_0\\0&0&1\end{bmatrix}=\begin{bmatrix}\cos\theta&-\sin\theta&x_0-x_0\cos\theta+y_0\sin\theta\\\sin\theta&\cos\theta&y_0-x_0\sin\theta-y_0\cos\theta\\0&0&1\end{bmatrix}.$$ (Note that, per the usual convention, a positive rotation angle represents a counterclockwise rotation.) Multiplying $(A,B,C)$ by this matrix produces $$\left(A\cos\theta+B\sin\theta,B\cos\theta-A\sin\theta,C+(A-A\cos\theta-B\sin\theta)\,x_0+(B-B\cos\theta+A\sin\theta)\,y_0\right).$$ Converting this into a linear equation by multiplying by $(x,y,1)^T$ and setting the result equal to zero, and then rearranging a bit results in $$(A\cos\theta+B\sin\theta)(x-x_0)+(B\cos\theta-A\sin\theta)(y-y_0)+Ax_0+By_0+C=0.$$ This looks plausible. The line’s normal has been rotated clockwise by $\theta$ and the line displaced somewhat.
