Reducible representation of planar molecule N2H2 with bond lengths as a basis
Instead of using the $\Delta r$ as in your figure redraw it with a vector  shown as an arrow parallel to each NH bond and label them 1 and 2. You know from the point group that the NH bonds are the same length and at the same angle so these vectors are similar but point in different directions.

Operate on the whole diagram including arrows (with labels) according to the operations in the point group. If, after an operation the figure is indistinguishable from your starting point, then count $1$ for each vector otherwise count $0$. 

In your figure the point in the point group is at the centre of the NN bond. The $C_2$ axis points out of the page centred at this point. The $\sigma_h$ plane is the plane of the figure. 

The  identity, which is an 'I exist' or 'do nothing' operation count 2. The $C_2$ operation is rotation by 180 degrees and so interchanges the vectors 1 and 2 so is not indistinguishable  and so each vector counts 0. Similarly for the inversion $i$ through the centre. Reflection in the mirror plane (the plane of the image) leaves the molecule indistinguishable so counts 2. Thus you have the reducible representation you give in your question.