I can't work out how many combinations of results 4 different teams may have. They can either win, lose or draw.

1 team = 3 (W,L,D)

2 teams = 9 (WW, WL, WD, LL, LW, LD, DD, DL, DW)

3 teams = 21 (I think)

how many for 4, and what is the maths behind it\/ Thanks