1. An image encoding method comprising the steps of: receiving a coding unit to be encoded; performing one of inter-frame prediction and intra-frame prediction on the coding unit to generate a prediction block; generating a residual prediction block based on the generated prediction block and the coding unit; and applying one transform matrix among a plurality of predetermined transform matrixes to the generated residual prediction block to transform the residual prediction block.