Let $A$ be an $ n \times n $ real strictly upper triangular matrix. Suppose we change the entry $a_{nn}$ to be a non-zero real number $z$. My question is, will the Jordan block sizes of the resulting matrix be the same for all non-zero $z$?
Thanks for your valuable time.
Yes. Write $A(z)$ for the matrix which has $(n,n)$ entry equal to $z$ and is otherwise equal to $A$. Then $A(z)$ has eigenvalue $z$ with a Jordan block of size $1$. The only other eigenvalue is $0$ and we have to show that the sizes of the corresponding Jordan blocks do not depend on $z$, provided $z\ne0$.
Now the sizes of the blocks are determined by the nullities of $A(z)^k$ for $k=1,2,3,\ldots$. If we write $A(z)$ as a block matrix $$\def\v#1{{\bf#1}} A(z)=\pmatrix{T&\v v\cr \v 0&z\cr}$$ where $T$ is strictly upper triangular, $\v v$ is $(n-1)$ by $1$ and $\v0$ is $1$ by $(n-1)$, then it is easy to confirm that $$A(z)^k=\pmatrix{T^k&T^{k-1}\v v+zT^{k-2}\v v+\cdots+z^{n-2}T\v v+z^{k-1}\v v\cr \v0&z^k\cr}\ .$$ Since $z\ne0$ we can row-reduce by scaling the last row and then subtracting suitable multiples of the new last row from other rows (which only changes the last column) to get $$\def\nty{\mathord{\rm nullity}} \nty(A(z)^k) =\nty\pmatrix{T^k&T^{k-1}\v v+zT^{k-2}\v v+\cdots+z^{n-2}T\v v+z^{k-1}\v v\cr \v0&1\cr}$$ and so $$\nty(A(z)^k) =\nty\pmatrix{T^k&T^{k-1}\v v+T^{k-2}\v v+\cdots+T\v v+\v v\cr \v0&1\cr} =\nty(A(1)^k)\ .$$ Thus the nullities do not depend on $z$, and this completes the proof.