A motor driving apparatus comprising: a dc link capacitor configured to store a direct current, DC, voltage; an inverter including a plurality of upper and lower arm switching elements (Sa, Sb, Sc; S'a, S'b, S'c) and configured to convert the voltage stored in the dc link capacitor into an alternating current, AC, voltage by switching operation of the switching elements and to output the converted AC voltage to a three-phase synchronous motor; a dc link voltage detector configured to detect the voltage of the dc link capacitor; an output current detector provided between the dc link capacitor and the inverter and configured to detect phase current (ia, ib, ic) flowing in the motor in a time divisional manner; and a controller configured to: control the inverter based on the phase current (ia, ib, ic), control rheostatic braking to be performed in order to stop the motor by turning all the upper arm switching elements (Sa, Sb and Sc) of the inverter on or turning all the lower arm switching elements (S'a, S'b and S'c) of the inverter off, perform bootstrap operation of gate terminals of the upper arm switching elements (Sa, Sb, Sc) of the inverter by turning the upper arm switching elements (Sa, Sb, Sc) of the inverter off and turning the lower arm switching elements (S'a, S'b, S'c) on during a first period (Pal, Pa2) prior to a motor alignment period (Pbl, Pb2) for aligning a rotor of the motor, determine whether the motor has stopped or rotates during the first period based on counter electromotive force caused by the motor, determine that the motor rotates when a rate of increase of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first predetermined value or a level of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first level, and control resumption of the rheostatic braking in order to stop the motor. a dc link capacitor configured to store a direct current, DC, voltage; an inverter including a plurality of upper and lower arm switching elements (Sa, Sb, Sc; S'a, S'b, S'c) and configured to convert the voltage stored in the dc link capacitor into an alternating current, AC, voltage by switching operation of the switching elements and to output the converted AC voltage to a three-phase synchronous motor; a dc link voltage detector configured to detect the voltage of the dc link capacitor; an output current detector provided between the dc link capacitor and the inverter and configured to detect phase current (ia, ib, ic) flowing in the motor in a time divisional manner; and a controller configured to: control the inverter based on the phase current (ia, ib, ic), control rheostatic braking to be performed in order to stop the motor by turning all the upper arm switching elements (Sa, Sb and Sc) of the inverter on or turning all the lower arm switching elements (S'a, S'b and S'c) of the inverter off, perform bootstrap operation of gate terminals of the upper arm switching elements (Sa, Sb, Sc) of the inverter by turning the upper arm switching elements (Sa, Sb, Sc) of the inverter off and turning the lower arm switching elements (S'a, S'b, S'c) on during a first period (Pal, Pa2) prior to a motor alignment period (Pbl, Pb2) for aligning a rotor of the motor, determine whether the motor has stopped or rotates during the first period based on counter electromotive force caused by the motor, determine that the motor rotates when a rate of increase of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first predetermined value or a level of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first level, and control resumption of the rheostatic braking in order to stop the motor. control the inverter based on the phase current (ia, ib, ic), control rheostatic braking to be performed in order to stop the motor by turning all the upper arm switching elements (Sa, Sb and Sc) of the inverter on or turning all the lower arm switching elements (S'a, S'b and S'c) of the inverter off, perform bootstrap operation of gate terminals of the upper arm switching elements (Sa, Sb, Sc) of the inverter by turning the upper arm switching elements (Sa, Sb, Sc) of the inverter off and turning the lower arm switching elements (S'a, S'b, S'c) on during a first period (Pal, Pa2) prior to a motor alignment period (Pbl, Pb2) for aligning a rotor of the motor, determine whether the motor has stopped or rotates during the first period based on counter electromotive force caused by the motor, determine that the motor rotates when a rate of increase of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first predetermined value or a level of the dc link voltage detected by the dc link voltage detector is equal to or greater than a first level, and control resumption of the rheostatic braking in order to stop the motor.