Example 6. Through point A $(a, 0)$ on the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$, a chord $\mathrm{AB}$ is drawn. On $\mathrm{AB}$ (or its extension), take a point $\mathrm{M}$ such that $\frac{\mathrm{AM}}{\mathrm{MB}}=\lambda$. When $\mathrm{B}$ moves on the ellipse, find the equation of the locus of point $\mathrm{M}$.
Let the coordinates of the moving point $\mathrm{M}$ be $\left(x_{M}, y_{M}\right)$, and the coordinates of point $B$ be $\left(x_{B}, y_{B}\right)$. We have
$$
\left\{\begin{array}{l}
x_{M} = \frac{a + \lambda x_{B}}{1 + \lambda}, \\
y_{M} = \frac{0 + \lambda y_{B}}{1 + \lambda}
\end{array} \Rightarrow \left\{\begin{array}{l}
x_{B} = \frac{(1 + \lambda) x_{M} - a}{\lambda}, \\
y_{B} = \frac{(1 + \lambda) y_{M}}{\lambda}
\end{array}\right.\right.
$$
Since $\left(x_{B}, y_{B}\right)$ lies on the ellipse,
$$
\therefore \frac{x_{B}^{2}}{a^{2}} + \frac{y_{B}^{2}}{b^{2}} = 1.
$$
Thus, the equation of the required trajectory is:
When $\lambda = 1$, $M$ is the midpoint of $A B$, and the equation of the trajectory of the midpoint of $A B$ is: $\frac{(2 x - a)^{2}}{a^{2}} + \frac{2 y^{2}}{b^{2}} = 1$.