The degrees of freedom (DoF) has been recognized as a powerful metric to characterize the capacity of interference channels in the high signal-to-noise (SNR) region. In this paper, by utilizing linear interference alignment, we investigate the DoF of multiple-input and multiple-output (MIMO) interference relay channels without symbol extensions. An innovative algorithm is presented to align the interference, where the filter matrices at the sources, relays and destinations are determined in an iterative manner. Based on the assumption that improperness of the alignment condition implies its unsolvability, an upper bound for the achievable DoF tuple by linear interference alignment is derived, and then utilized to examine the performance of the proposed alignment algorithm. Simulation results show that the iterative algorithm can achieve the upper bound in medium to high DoF regions.