A rotating electric machine (200, 202) comprising a rotor that includes: a plurality of d-axis magnet insertion holes into which a plurality of respective d-axis magnets (254b, 254c) is inserted; and a plurality of first magnet insertion holes into which a plurality of respective q-axis magnets is inserted, wherein the d-axis magnets (254b, 254c) are arranged facing each other so as to sandwich a d-axis, each q-axis magnet is arranged on a respective q-axis, the first magnet insertion holes and the d-axis magnet insertion holes being set to have larger dimensions than the respective permanent magnets, thus forming gaps, each first magnet insertion hole having: a first gap (257a1) outside the q-axis magnet in a radial direction of the q-axis magnet and formed at corners of the q-axis magnet and at a center of a radially outward end side of the q-axis magnet; and a second gap inside the q-axis magnet in the radial direction of the q-axis magnet formed only at corners of the q-axis magnet, each of the d-axis magnet insertion holes having a third gap between the d-axis magnets (254b, 254c) that face each other so as to sandwich the d-axis, the third gap being located at corners of the magnets, wherein a cross-sectional shape of the q-axis magnets in an axial direction of the rotor is substantially rectangular; wherein a cross-sectional shape of the d-axis magnets (254b, 254c) in the axial direction of the rotor is substantially arc-shaped, such that the convex side thereof is directed towards the inner radial direction of the rotor; and, if setting: two virtual lines, each coinciding with a boundary of a d-axis magnet insertion hole on opposite sides of the d-axis, on an inner circumference side of the rotor; and an innermost virtual circle that is concentric with an inner circumference of the rotor and contacts the virtual lines, wherein the virtual circle is contacting the d-axis magnet insertion hole on an inner circumference side of the rotor, there is one or more tangent points between each virtual line and the virtual circle; a d-axis magnet insertion hole further comprising a fourth gap at a position where the d-axis magnet insertion hole faces a first magnet insertion hole, wherein the fourth gap is located at a corner of the d-axis magnet. a plurality of d-axis magnet insertion holes into which a plurality of respective d-axis magnets (254b, 254c) is inserted; and a plurality of first magnet insertion holes into which a plurality of respective q-axis magnets is inserted, wherein the d-axis magnets (254b, 254c) are arranged facing each other so as to sandwich a d-axis, each q-axis magnet is arranged on a respective q-axis, the first magnet insertion holes and the d-axis magnet insertion holes being set to have larger dimensions than the respective permanent magnets, thus forming gaps, each first magnet insertion hole having: a first gap (257a1) outside the q-axis magnet in a radial direction of the q-axis magnet and formed at corners of the q-axis magnet and at a center of a radially outward end side of the q-axis magnet; and a second gap inside the q-axis magnet in the radial direction of the q-axis magnet formed only at corners of the q-axis magnet, each of the d-axis magnet insertion holes having a third gap between the d-axis magnets (254b, 254c) that face each other so as to sandwich the d-axis, the third gap being located at corners of the magnets, wherein a cross-sectional shape of the q-axis magnets in an axial direction of the rotor is substantially rectangular; wherein a cross-sectional shape of the d-axis magnets (254b, 254c) in the axial direction of the rotor is substantially arc-shaped, such that the convex side thereof is directed towards the inner radial direction of the rotor; and, if setting: two virtual lines, each coinciding with a boundary of a d-axis magnet insertion hole on opposite sides of the d-axis, on an inner circumference side of the rotor; and an innermost virtual circle that is concentric with an inner circumference of the rotor and contacts the virtual lines, wherein the virtual circle is contacting the d-axis magnet insertion hole on an inner circumference side of the rotor, there is one or more tangent points between each virtual line and the virtual circle; a d-axis magnet insertion hole further comprising a fourth gap at a position where the d-axis magnet insertion hole faces a first magnet insertion hole, wherein the fourth gap is located at a corner of the d-axis magnet.