# Compute the Smith Normal Form for some characteristic matrix

Let $k$ be a field. I'm trying to compute the Smith Normal Form for the characteristic matrix of $A=(a_{ij}) \in M_{n\times n} (k)$ where $a_{ij}=1$ for all $i$ and $j$.

I haven't figured it out yet but when I use Maplesoft to compute $SmithForm(A)$ for finite integer values of $n$, it returns the $n\times n$ matrix with $1$ in position $1,1$ and zero everywhere else. Does anyone know why it's doing this? expected it to at least return a matrix in which each diagonal entry is nonzero.

Thanks

• does not the smith form conserve the rank? the rank of $A$ is one, so the smith form will have only one nonzero diagonal. – abel Mar 28 '15 at 23:04
• Smith normal form is essentially doing row reductions and then doing column reductions. For fields this is easy because there are invertible elements. Doing row reductions on $A$ gives the first row of all $1$'s, and $0$'s everywhere else. Then doing column reductions on entries right of the first entry gives all $0$'s. – Yeldarbskich Mar 28 '15 at 23:11
• Is not the Smith Normal Form, by definition, supposed to have diagonal consisting of $1$'s and monic nonzero elements of $k[x]$? – Sam Mar 28 '15 at 23:15
• Not really, no... where would you get those polynomials from, anyway? – A.P. Mar 28 '15 at 23:19
• I understand better now, thank you, everyone... Thanks for pointing out that definition. I've come across a couple sources that hide the fact that the diagonal entries may be zero. – Sam Mar 28 '15 at 23:22

For the SNF of $XI-A$ I suggest you to switch between the first and the last columns, then subtract the first row from all the others, and so on. You will easily get the SNF: $\operatorname{diag}(1,X,\dots,X,X(X-n))$.