This study presents a method to resize images by a rational factor of P/Q in the discrete cosine transform (DCT) domain, where P and Q are relatively prime integers larger than 1. Our method extends on the prior work of Mukherjee and Mitra, which utilises the spatial relationship of DCT coefficients between a block and its sub-blocks. To resize images by a factor of P/Q, the images are first up-sampled by a factor of P and then down-sampled by a factor of Q. Although this method produces resized images with good visual quality, it requires high computational cost. In this study, the authors generalise an observation found in the spatial relationship of the DCT coefficients between a block and its sub-blocks. Subsequently, a sparse matrix representation is derived from this observation to reduce the computational cost of the proposed method. To further reduce computational cost of the proposed method, a subset of up-sampled DCT coefficients is used in the down-sampling operation. From various experiments, the authors have determined the lowest number of up-sampled DCT coefficients to be used in the down-sampling operation without affecting the visual quality of the resized images. As compared to existing methods, the proposed method requires lower computational cost and produces resized images of good visual quality.