I know in polar coordinates, a $2d$ line equation is given in the form of $$r = x \cdot \cos(\theta) + y \cdot \sin(\theta),$$ where the parameters are defined as in this.
I want to derive an equation of the $2d$ line which is perpendicular to that given line and passing through a given another point (say $(x_1, y_1)$). What would be the equation of the new line?
Moving my comments to the answer box.
A general equation for a line orthogonal to the one you gave is $$ r'=-x\sin\theta+y\cos\theta. $$
Now plug $(x_1,y_1)$ in the above equation to find the (unique) value of $r'$ that make it pass through $(x_1,y_1)$.