In [1, p. 34 exercise 2.9] we are asked to prove that the rank of the complex n\times n matrix
\mathbf{A}=\sum\limits_{i=1}^{m} d_{i}\mathbf{u}_i\mathbf{u}_{i}^{H} (1)

where the \mathbf{u}_i are linearly independent complex n \times 1 vectors and the d_i‘s are real and positive, is equal to m if m \leq   n. Furthermore we are asked what the rank equals to if m > n.
Solution:
Let \mathbf{A}=\mathbf{U}\mathbf{D}\mathbf{U}^H where  {\bf U} = \left[ {\begin{array}{*{20}c} {{\bf u}_1 } &  \cdots  & {{\bf u}_m }  \\ \end{array}} \right] and \mathbf{D}=diag(d_1,...,d_m). If T is the linear transform associated to \mathbf{A} then T can be written as the composite of the linear transformations [2, propsition 6.3, p. 41] T_1:\mathbb{C}^m\rightarrow\mathbb{C}^n,T_2:\mathbb{C}^m\rightarrow \mathbb{C}^m and T_3:\mathbb{C}^n\rightarrow \mathbb{C}^m which are respectively associated to the matrices \mathbf{U},\mathbf{D} and \mathbf{U}^H, T=T_1\circ T_2 \circ T_3. For m\leq n the m linear independent vectors span the subspace \mathbb{C}^{m} [2, proposition 4.3, page 112] thus the column rank of the matrix \mathbf{U} is m. The matrix \mathbf{U}^H has the same rank as the matrix \mathbf{U}. The proof of this statement can be obtained by the observation that given \mathbf{u}_i,i=1,...,m linear independent vectors, then the complex conjugates of those vectors are also linear independent. Thus {{\bf U}^{*}}^T = \left[ {\begin{array}{*{20}c} {{\bf u}^{*}_1 } &  \cdots  & {{\bf u}^{*}_m }  \\ \end{array}} \right]^T =\mathbf{U}^H . Furthermore because the column rank equals the the row rank of a matrix [2, Theorem 4.4, page 218] we have rank(\mathbf{U})=rank(\mathbf{U}^H). The linear transformation T_3 is surjective as its rank(T_3)=m. T_2 is bijective as the diagonal matrix associated with it is invertible [2, proposition 2.3, page 209]. The composite T_2 \circ T_3 is thus surjective (onto) to \mathbb{C}^m and thus the dimension of the image obtained by T_1 \circ T_2 \circ T_3 (per definition the rank of the matrix) is the same as the one that would be obtained by T_1 by linear combinations of a basis in \mathbb{C}^m. Thus rank(T)=rank(T_1)=m. QED. For m >  n there can be no m linear independent n \times 1 vectors. The maximum number of linear independent n \times 1 vectors is simply n. This assertion can be proven by the equality of the row and column rank of a matrix. For in this case the column rank of \mathbf{U} would be m while the row rank of \mathbf{U} would not be larger than n. The rank of the matrix cannot be larger than n in this case.

[1] Steven M. Kay: “Modern Spectral Estimation – Theory and Applications”, Prentice Hall, ISBN: 0-13-598582-X.
[2] Lawrence J. Corwin and Robert H. Szczarba: “Calculus in Vector Spaces”, Marcel Dekker, Inc, 2nd edition, ISBN: 0824792793.