What is an example of a finite local rings, that has length 2 or 3? 
I want something different from $F\_{q}[x] / x^{i}$ for $i=2, 3$; I'm looking for something more interesting. If you can give me examples of higher length, yet have "simple structure" (e.g. $F\_{q}[x]/x^{i}$), that would be nice too. 


I know this is related to [Classification of finite commutative rings](https://mathoverflow.net/questions/7133/classification-of-finite-commutative-rings), but I didn't completely understand the answer there. 



Examples of finite local rings of length 2 or 3
There are a bunch of different notions of length/depth in ring theory: Projective length, Artinian length, local depth, etc. If we take length to mean Artinian length, then Charles is right: The Artinian length of a finite-dimensional commutative algebra is just its dimension. Every such algebra is a direct sum of local ones, and you can chip away at each local summand of the ring from the bottom end, one dimension at a time.


The local algebras that have a description that looks as nice as $\mathbb{F}[x]/(x^n)$ are the toric ones. These local algebras are $\mathbb{F}[\vec{x}]$ divided by an ideal generated by monomials and a basis of monomials. You can make a diagram of the exponents of the monomials that aren't killed by the ideal. If the ring has $n$ generators, then the diagram is a stable stack of blocks in the $n$-dimensional orthant. For example, the algebra $\mathbb{F}[x,y]/(x^3,x^2y,y^3)$ has a basis of seven monomials: 1, $x$, $x^2$, $y$, $xy$, $y^2$, $xy^2$. The diagram of these monomials looks like this:



```
#
###
1##

```

I have put a 1 at the corner in the diagram corresponding to the monomial 1.


What is easy to forget is that all finite-dimensional local algebras with one generator in $m/m^2$ are of this form, but with more variables these are just special examples.




---


I was looking at the second part of the question first, interesting higher-dimensional examples. Here are some non-isomorphic local rings $R$ (not necessarily algebras) that have length 2 or 3 and such that $R/m = \mathbb{Z}/p$:


Length 2:


1. $(\mathbb{Z}/p)[x]/(x^2)$
2. $\mathbb{Z}/p^2$


Length 3:


1. $(\mathbb{Z}/p)[x]/(x^3)$
2. $(\mathbb{Z}/p)[x,y]/(x^2,xy,y^2)$
3. $(\mathbb{Z}/p^2)[x]/(px,x^2)$
4. ~~$(\mathbb{Z}/p^2)[\sqrt{p}]$~~ $\mathbb{Z}[\sqrt{p}]/p^{3/2} = \mathbb{Z}[x]/(x^2-\lambda p,x^3)$
5. $\mathbb{Z}[x]/(x^2-\lambda p,x^3)$ where $\lambda \in \mathbb{Z}/p$ is not a square. (Noted by Jonathan Wise.)
6. $\mathbb{Z}[x]/(x^2+2x,4)$ (Similar idea to previous, in characteristic 2.)
7. $\mathbb{Z}/p^3$


(**Edit:** My notation for #4 was not strictly correct.)


~~I *think*, although I can't really speak with authority, that these are all of them.~~ I thought that I knew all of these rings, but that was naive. One point is that among algebras over $\mathbb{Z}/p$, the length is too small to see anything non-toric. But you can also have local rings that look like these toric local algebras (which I listed first), but have carries. The most creative one is the fourth one of length 3, namely $(\mathbb{Z}/p^2)[\sqrt{p}]$. You can express an element of this ring as three digits in base $p$, say $d\_2d\_1d\_0$. Then addition carries from $d\_0$ to $d\_2$.


I would also guess that all of these generalize to $\mathbb{F}\_q$, using [the Witt vector](http://en.wikipedia.org/wiki/Witt_vector) construction in the cases with carries. And maybe it is again all of them.


