A category being self-dual vs. it being a groupoid

What is the relationship between self-duality and groupoid-ness? Does any condition imply the other? Is there an example which helps understand the difference?

To go from a self-duality $F$ on a category to a groupoid, I guess I have to check for $f: A \to B$ that $F(f) \circ f$ and $f \circ F(f)$ are the identities on $A$ and $B$ respectively. I also guess it is safe to assume that all groupoid are isomorphic (not just equivalent) to its dual.

Am I right in my guesswork?

-
For a groupoid, the identity on objects and inversion on morphisms is an isomorphism with the dual groupoid. For the other direction, see Leo's answer below, working out the simplest possible example is not what I consider research level, please read mathoverflow.net/faq – a-fortiori Oct 7 2011 at 11:58
There are a great many non-groupoidal self-dual categories. One is finite-dimensional vector spaces: here the self-duality takes $V$ to its dual space. Pontryagin duality provides another famous example (the category of locally compact Hausdorff topological abelian groups is self-dual: the self-duality takes $G$ to its character group $\hat{G} = \hom(G, S^1)$). – Todd Trimble Oct 7 2011 at 12:22
The monoid of n\times n matrices is self dual by transpose, the free monoid is self dual by word reversal. Tons of monoids that are not groups are self dual. Just take a monoid cross its opposite. – Benjamin Steinberg Oct 7 2011 at 14:38
Of course any commutative monoid that is not a group is also a counterexample. – Benjamin Steinberg Oct 7 2011 at 17:42

The category $\mathbf{2}$ with two objects ($0$ and $1$, say) and just one map between them ($0 \to 1$) is self-dual and clearly not a groupoid. To see that it is self-dual, just consider the functor that exchanges $0$ and $1$. It is clearly its own quasi-inverse. If it were a groupoid, then the objects $0$ and $1$ would be isomorphic but there is no map from $1$ to $0$.

-
Exchanging $0$ and $1$ does not seem to be functorial, what would be the image of the unique morphism? It must go $F(0) \to F(1)$. – Ali Lahijani Oct 7 2011 at 11:06
the following variant should work: take the category with one object $*$, the identity arrow and one non-identity arrow $a:*\to *$, with composition law determined bye $a^2=a$. This should be self-dual, and not a groupoid.. – Mattia Talpo Oct 7 2011 at 12:04
Leo's example is correct. $F(0)=1$, $F(1)=0$, the unique arrow is a morphism $1\to 0$ in $\mathbf 2^\mathrm{op}$. – a-fortiori Oct 7 2011 at 12:09
I think I would accept Mattia's comment if it had been posted as an answer. – Ali Lahijani Oct 7 2011 at 13:05
ehm, I have to agree with a-fortiori and Leo Alonso, his example works perfectly fine too.. thanks anyway! – Mattia Talpo Oct 7 2011 at 15:01