notice, go around a full circle "clockwise", or backwards, we'd get the negative angles, a full circle will be -2π, go around again, and is -2π-2π or -4π.
now, notice the last bit, the red angle, we went around -π more after the -4π, which makes it -5π.
therefore, the cot(-5π) is the same value as the cot(π),