Rotate image problem

i understood all but while making transpose of matrix we are swapping a[i][j] with a[j][i] …ohk…but why only if (i<j)…
kindly elaborate like for somewhat small triangle…
regards

image