1. An X-ray imaging apparatus comprising: an X-ray source configured to generate and irradiate X-rays; at least one X-ray detector configured to detect the irradiated X-rays; at least one coupling module including an electric device configured to generate an electrical signal according to whether the X-ray detector has been coupled; and a controller configured to determine a coupling module with which the X-ray detector has been coupled among the at least one coupling module, based on the electrical signal.