Illustration of the interactions. The focal fish (in red) aims at keeping a stable target position relative to its neighbour. In (a) this target position is behind the neighbour, while in (b) it is on the side of the neighbour. The movement in the direction of the target can be interpreted in terms of attraction or repulsion response if it has a projection onto the attraction/repulsion vector pointing in the direction of the neighbour. If the movement response has a component along the direction parallel to the neighbour (the alignment vector), it can also be interpreted as alignment. In general, the attraction/repulsion vector and the alignment vector are not orthogonal to each other, and in the particular case of aligned individuals with target positions in front or behind, the attraction and alignment vectors are not even linearly independent.