# How can I use an n-dimension all-ones square matrix J to represent its power.

J is a matrix described above, and I want to obtain $${ J }^{ 2 }, { J }^{ 3 },...,{ J }^{ n }$$I got some insights from the answer: What are the eigenvalues of matrix that have all elements equal 1? However, I still cannot figure out how to do it, although the characteristic equation is $${ \lambda }^{ n }=n{ \lambda }^{ n-1 }$$ and with the help of Cayley-Hamilton Theorem, I can get $${ J }^{ n }=nJ^{ n-1 }$$ But confused I cannot iterate J as: $${ J }^{ n }=n{ J }^{ n-1 }=n(n-1){ J }^{ n-2 }=...=n!{ J }^{ }$$Anyone can explain this?

-
You're right up until the point $J^{n-1} = (n-1)J^{n-2}$. The equation you deduced from Cayley--Hamilton only holds for the power $n$ and you can not simply replace $n$ by $n-1$. In fact, $J^m = nJ^{m-1}$ for all $m > 1$. –  fuglede Jan 8 at 14:47

If $\def\tr{\operatorname{tr}}A$ is any rank$~1$ matrix of size $n\times n$ (for instance your all-entries-$1$ matrix$~J$), then its characteristic polynomial is $X^{n-1}(X-\tr A)$, where the factor $X^{n-1}$ is deduced from the $n-1$-dimensional eigenspace for eigenvalue $0$, and the final factor is there to make the sum of the roots (with multiplicity) of the characteristic polynomial equal to the trace of $A$, as it should be. But since the factor $X^{n-1}$ came from an actual eigenspace (as opposed to a generalised eigenspace), one only gets a single factor $X$ in the minimal polynomial. So if $n>1$ the minimal polynomial of any $n\times n$ matrix of rank$~1$ is $X(X-\tr A)$. (Check that even in case $\tr A=0$, the minimal polynomial is $X(X-\tr A)=X^2$ rather than $X$.)
In case of your matrix $J$, the trace is$~n$, so the minimal polynomial is $X(X-n)=X^2-nX$; you matrix satifies $J^2=nJ$. From this it follows easily that $J^{k+1}=n^kJ$ for all $k\in\mathbf N$.
$J^2 = n J,$ so $J^3 = n^2 J,$ in general $J^k = n^{k-1} J.$