  Taking the clue from the modern theory of polarization [R. Resta, Rev. Mod.
Phys. {\bf 66}, 899 (1994)], we identify an operator to distinguish between
${\mathbb Z}_2$-even (trivial) and ${\mathbb Z}_2$-odd (topological) insulators
in two spatial dimensions. Its definition extends the position operator [R.
Resta and S. Sorella, Phys. Rev. Lett. {\bf 82}, 370 (1999)], which was
introduced in one-dimensional systems. We first show a few examples of
non-interacting models, where single-particle wave functions are defined and
allow for a direct comparison with standard techniques on large system sizes.
Then, we illustrate its applicability for an interacting model on a small
cluster, where exact diagonalizations are available. Its formulation in the
Fock space allows a direct computation of expectation values over the
ground-state wave function (or any approximation of it), thus allowing us to
investigate generic interacting systems, such as strongly-correlated
topological insulators.
