We consider the optimization of a two-hop linear relay channel based on an amplify-and-forward Multiple-Input Multiple-Output (MIMO) relay. The relay is assumed to derive the output signal by applying a Relay Transform Matrix (RTM) applied to the input signal. Assuming perfect channel state information about the channel at the relay and iid transmitted symbols, the RTM is optimized according to two different criteria: <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">i)</i> MIMO information rate; <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">ii)</i> information rate based on Orthogonal Space–Time Block Codes. The two assumptions have been addressed in part in the literature. The optimization problem is reduced to a manageable convex form, whose KKT equations are explicitly solved. Then, a parametric solution is given, which yields the power constraint and the information rate achieved with uncorrelated transmitted symbols as functions of a positive indeterminate. The solution for a given average power constraint at the relay is amenable to a <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">water-filling-like</i> algorithm, and extends earlier literature results addressing the case without the direct link. The duty cycle of the two-hop relaying process is also addressed in the general form of the achievable rate. Simulation results are reported, which are relevant to a Rayleigh fading MIMO relay channel and the role of the direct link SNR is precisely assessed. Duty cycle optimization is also considered by a numerical example.