This paper studies the joint design of transmit beamformers, receive combiners, and linear relaying matrix for a two-way amplify-and-forward (AF) relay system equipped with multiple-antennas at sources and relay. A single data stream is transmitted by each source. Due to the non-convexity of the optimization problem, finding a solution that maximizes the sum-rate appears to be intractable. Hence, a solution to the original problem is approximated via the iterative solution of three optimization problems, one for the transmit beamformer, one for the receive combiner, and one for the linear relaying matrix. Since the latter is non-convex, a suboptimal iterative procedure is proposed. Joint optimization is assumed to be performed at the relay, which designs the transceiver (thanks to perfect channel state information) and informs the sources of the transmit beamformers/receive combiners. Finally, an upper bound to the achievable sum-rate is provided. The proposed technique shows achievable sum-rate performance very close to the upper bound. Moreover, the algorithm converges to the final solution in a reasonable number of iteration.