ok so i was working if someone can help me on this one proof:

Suppose T is a linear operator on a finite-dimensional vector space V with distinct eigenvalues λ_1,...,λ_n and corresponding multiplicities m_1,...,m_k. Suppose that β is a basis for V such that [T]_β is an upper triangular matrix. Prove that the diagonal entries of [T]_β are λ_1,...,λ_k and that each λ_i occurs m_i times.

Thanks!