The transpose of a matrix is obtained by mirroring its elements along the diagonal. Diagonal elements remain fixed, while off-diagonal elements are swapped:
$ A^T=\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}^T = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} $
More generally, the transpose is defined element-wise as follows. We can see that when subscripts $i=j$, nothing changes.
$ (A^T)_{ij}=A_{ji}$