Example 4. Find the length of the tangent from a point $P\left(x_{1}, y_{1}\right)$ outside a circle $(x-a)^{2}$ $+(y-b)^{2}=r^{2}$.
Let the parametric equation of the line passing through point $P\left(x_{1}, y_{1}\right)$ be
$$
\left\{\begin{array}{l}
x=x_{1}+t \cos \theta \\
y=y_{1}+t \sin \theta
\end{array}\right.
$$

Substituting (1) into the equation of the circle and simplifying, we get
$$
\begin{array}{l} 
t^{2}+2\left[\left(x_{1}-a\right) \cos \theta+\left(y_{1}-b\right) \sin \theta\right] t \\
+\left(x_{1}-a\right)^{2}+\left(y_{1}-b\right)^{2}-r^{2}=0,
\end{array}
$$

If the length of the required tangent is 1, then by the geometric meaning of $t$ in (2), Vieta's formulas, and the secant-tangent theorem, we have
$$
l^{2}=\left(x_{1}-a\right)^{2}+\left(y_{1}-b\right)^{2}-r^{2} \text {. }
$$