  This paper is dedicated to studying matrix solutions of the cubic Szeg\H{o}
equation on the line in Pocovnicu [arXiv:1001.4037, arXiv:1012.2943] and
G\'erard--Pushnitski [arXiv:2307.06734], leading to the following matrix
Szeg\H{o} equation on $\mathbb{R}$, \begin{equation*} i \partial_t U =
\Pi_{\geq 0} \left(U U ^* U \right), \quad \widehat{\left(\Pi_{\geq 0}
U\right)}(\xi )= \mathbf{1}_{\xi \geq 0}\hat{U}(\xi )\in \mathbb{C}^{M \times
N}. \end{equation*} Inspired from the space-periodic matrix Szeg\H{o} equation
in Sun [arXiv:2309.12136], we establish its Lax pair structure via double
Hankel operators and Toeplitz operators. Then the explicit formula in
[arXiv:2307.06734] can be extended to two equivalent formulas in the matrix
equation case, which both express every solution explicitly in terms of its
initial datum and the time variable.
