We study topological insulators characterized by the integer topological invariant Z, in even and odd spacial dimensions. These are well understood in case when there are no interactions. We extend the earlier work on this subject to construct their topological invariants in terms of their Green's functions. In this form, they can be used even if there are interactions. Specializing to one and two spacial dimensions, we further show that if two topologically distinct topological insulators border each other, the difference of their topological invariants is equal to the difference between the number of zero energy boundary excitations and the number of zeroes of the Green's function at the boundary. In the absence of interactions Green's functions have no zeroes thus there are always edge states at the boundary, as is well known. In the presence of interactions, in principle Green's functions could have zeroes. In that case, there could be no edge states at the boundary of two topological insulators with different topological invariants. This may provide an alternative explanation to the recent results on one dimensional interacting topological insulators.