I am following this algorithm to get the Jordan Matrix of a Matrix. 
But I having problem to see how $(A-\lambda I)^r$v vectors are independent when $r = 1 ,2 ,3 ......k$ and $\lambda$ is an Eigen value. Here $k$ is the least natural number so that the dimension of the null space of $(A-\lambda I)^k$ is the algebraic multiplicity of $\lambda$.
Can anyone help me to understand how they are independent.
If $A$ is a single Jordan block for$~\lambda$ of size$~k$ and $v\notin\ker((A-\lambda I)^{k-1})$, there is a standard argument that the vectors $v_r=(A-\lambda I)^rv$ for $r=0,1,\ldots,k-1$ (not $r=1,2,\ldots,k$ as the question says) are linearly independent. Note that the final vector in the list, and hence all vectors, are nonzero by the choice of$~v$. Supposing there exists a nontrivial relation $\sum_{r=0}^{k-1}c_rv_r=0$, at least two of the coefficients $c_i$ are nonzero; choose a nontrivial relation with a minimal number of nonzero terms, and let $c_rv_r$ be the last nonzero term. Since $A-\lambda I$ sends $v_i$ to $v_{i+1}$ for $i<k-1$ and sends $v_{k-1}$ to $0$, applying $(A-\lambda I)^{k-r}$ to our relation kills the final term but no other term; it produces a nontrivial relation with one less nonzero term, which is a contradiction.
Nonetheless, the algorithm described in the question is wrong, and does not guarantee linear independence of the vectors it produces. What it should do in point 4 is talk about linear independence in the quotient vector space $E_\lambda^k/E_\lambda^{k-1}$, but instead it wants to avoid talking about quotient spaces and talks implicitly about nonzero vectors there (by forbidding to choose a vector in $E_\lambda^{k-1}$) whose representatives in the original space are linearly independent. That condition does not cut it, as the following example shows. Take $A$ to be a nilpotent Jordan normal form with $2$ blocks of size$~2$, so it is a $4\times4$ block diagonal matrix with two diagonal blocks $\binom{0~1}{0~0}$. Step 4 asks us to choose two linearly independent vectors in $E_0^2=\Bbb C^4$ not lying in $E_0^1=\ker A=\langle e_1,e_3\rangle$. This allows, instead of the good choice of taking $e_2$ and $e_4$, the possibility of choosing say $e_2$ and $e_2+e_1$; in the latter case their images by $A$ are identical (both are $e_1$), clearly violating the condition that all $4$ vectors produced be linearly independent.