The phase of the channel matrix elements has a significant impact on channel capacity in a mobile multiple-input multiple-output (MIMO) communication system, notably in line-of-sight (LoS) communication. In this paper, the general expression for the phase of the channel matrix at maximum channel capacity is determined. Moreover, the optimal antenna configuration of the 2 × 2 and 3 × 3 transceiver antenna array is realized for LoS communication, providing methods for n×n optimal antenna placement, which can be used in short-range LoS communication and non-scattering environment communication, such as coupling train communication and inter-satellite communication. Simulation results show that the 2 × 2 rectangular antenna array is more suitable for the communication of coupling trains, while the 3 × 3 circular arc antenna array is more suitable for virtual coupling trains according to antenna configurations. Moreover, the 2 × 2 antenna rectangular configuration proposed in this paper has reached the optimal channel in inter-satellite communication, which lays a foundation for the deployment of communication systems.