Reconfigurable intelligent surface (RIS) is an emerging technique employing metasurface to reflect the signal from the source node to the destination node. Essentially, RIS can be considered as a passive relay between the source and destination node. By contrast, relay node in a traditional network has to be active, consuming energy when it is relaying the signal or information. It is worth investigating the differences between RIS and relay. In this paper, we compare the performances between RIS and active relay for a general multiple-input multiple-output (MIMO) system. To make the comparison fair and comprehensive, both the performances of RIS and active relay are optimized with best-effort, by formulating a non-convex optimization problem respectively. In case of RIS, transmit beamforming and reflecting coefficients are jointly optimized. In case of active relay including half-duplex relay and full-duplex relay, transmit beamforming for both source and relay are optimized. The original nonconvex optimization problems are transformed into to a weighted mean-square error (MSE) minimization problem and solved by the proposed alternating optimization algorithm, respectively. Numerical results are presented to demonstrate the validity of the proposed algorithm.