linear algebra – If $ V_j = Ker (A- lambda I) ^ j $, Why $ dim (V_j) = r_i $ if and only if $ V_j = V_ {j + 1} $?

If we have a matrix $ A $ and the characteristic polynomial is $ (x- lambda_1) ^ {r_1} cdot … cdot (x- lambda_m) ​​^ {r_m} $ and we define for each $ lambda_i $, $ V_ {j} = ker (A- lambda I) ^ j $. Why are there outings $ k such as $ dimV_k = r_i $and why does it hold if and only if $ V_k = V_ {k + 1} $? Also, is it possible to have $ dimV_j> r_i $? I've seen this on the algorithm to find the Jordan form, and I'm trying to understand why the algorithm works.