A motor driving apparatus , comprising: an inverter having a plurality of switching elements, and configured to output alternating current, AC, power to a three-phase motor based on a switching operation; a switching device , disposed between the inverter and the motor , configured to switch windings of the motor to Y connection or a Δ connection; a controller configured to control the inverter and the switching device ; and a temperature detector (DT) attached to the inverter and configured to detect temperature of the inverter , wherein in response to the windings of the motor being switched from the Y connection to the Δ connection, the controller is configured to control an operating frequency of the motor to be less than or equal to a first frequency or control an output of the inverter to be stopped, and in response to the windings of the motor being switched from the Δ connection to the Y connection, the controller is configured to control an operating frequency of the motor to be less than or equal to a second frequency which is less than the first frequency or control an output of the inverter to be stopped, wherein in response to the windings of the motor being switched from the Y connection to the Δ connection, the controller is further configured to control the temperature of the inverter to be less than or equal to the first reference temperature, and in response to the windings of the motor being switched from the Δ connection to the Y connection, the controller is configured to control the temperature of the inverter to be less than or equal to the second reference temperature which is higher than the first reference temperature. an inverter having a plurality of switching elements, and configured to output alternating current, AC, power to a three-phase motor based on a switching operation; a switching device , disposed between the inverter and the motor , configured to switch windings of the motor to Y connection or a Δ connection; a controller configured to control the inverter and the switching device ; and a temperature detector (DT) attached to the inverter and configured to detect temperature of the inverter , wherein in response to the windings of the motor being switched from the Y connection to the Δ connection, the controller is configured to control an operating frequency of the motor to be less than or equal to a first frequency or control an output of the inverter to be stopped, and in response to the windings of the motor being switched from the Δ connection to the Y connection, the controller is configured to control an operating frequency of the motor to be less than or equal to a second frequency which is less than the first frequency or control an output of the inverter to be stopped, wherein in response to the windings of the motor being switched from the Y connection to the Δ connection, the controller is further configured to control the temperature of the inverter to be less than or equal to the first reference temperature, and in response to the windings of the motor being switched from the Δ connection to the Y connection, the controller is configured to control the temperature of the inverter to be less than or equal to the second reference temperature which is higher than the first reference temperature. <EOS>