Lets denote the point be r_0 and the circle center be r_1 with radius d1, the vector or scaler nature of the variables are understood.

in order to find the direction normal of the tangent line, observed that,  the touching point , the given point and center of circle form an right angle triangle. and the direction normal ( between touching point and given point) and the line from touching point to the center of circle is perpendicular.

\vec{n} \cdot (r_1-r_0) = \sqrt{(r_1-r_0)^2-d^2}

\vec{n_p} \cdot (r_1-r_0) = \pm d

for 2-D

\vec{n} = (n_x, n_y) , \vec{n_p} = (n_y, -n_x)

in 3-D, we have to specific the tangent plan.

by solving the equation, we have the direction normal and done.

if we don’t solve the matrix equation, we can set the direction normal to

\vec{n} = ( cos\theta, sin\theta)

thus, by solving \theta, we have the vector \vec{n}.