  We work in the space of $m$-by-$n$ real matrices with the Frobenius inner
product. Consider the following
  Problem: Given an m-by-n real matrix A and a positive integer k, find the
m-by-n matrix with rank k that is closest to A.
  I discuss a rank-preserving differential equation (d.e.) which solves this
problem. If X(t) is a solution of this d.e., then the distance between $X(t)$
and $A$ decreases as t increases; this distance function is a Lyapunov function
for the d.e. If $A$ has distinct positive singular values (which is a generic
condition) then this d.e. has only one stable equilibrium point. The other
equilibrium points are finite in number and unstable. In other words, the basin
of attraction of the stable equilibrium point on the manifold of matrices with
rank $k$ consists of almost all matrices. This special equilibrium point is the
solution of the given problem. Usually constrained optimization problems have
many local minimums (most of which are undesirable). So the constrained
optimization problem considered here is very special.
