  In this paper, we study the optimal degrees of freedom (DoF) region for the
two-pair MIMO two-way relay channel (TWRC) with asymmetric antenna setting,
where two pairs of users exchange information with the help of a common relay.
Each user $i$ is equipped with $M_i$ antennas, for $i=1,2,3,4$, and the relay
is equipped with $N$ antennas. First, we derive an outer bound of the DoF
region by using the cut-set theorem and the genie-message approach. Then, we
propose a new transmission scheme to achieve the outer bound of the DoF region.
Due to the asymmetric data exchange, where the two users in each pair can
communicate a different number of data streams, we not only need to form the
network-coded symbols but also need to process the additional asymmetric data
streams at the relay. This is realized through the joint design of relay
compression matrix and source precoding matrices. After obtaining the optimal
DoF region, we study the optimal sum DoF by solving a linear programming
problem. From the optimal DoF region of this channel, we show that in the
asymmetric antenna setting, some antennas at certain source nodes are redundant
and cannot contribute to enlarge the DoF region. We also show that there is no
loss of optimality in terms of the sum DoF by enforcing symmetric data
exchange, where the two users in each pair are restricted to communicate the
same number of data streams.
