A permanent magnet type rotating electric machine, comprising: a rotor including a rotor core having a polygonal shape and a plurality of permanent magnets defining magnetic poles and arranged on an outer periphery of the rotor core, the permanent magnets having a half-barrel like cross-section formed by a horizontal straight line and two vertical straight lines connected by a circular arc, wherein each permanent magnet is determined by a shape deviation amount which is a signed number, wherein the absolute value of the shape deviation amount is defined by the distance of the shift between a vertical line through the center of the circular arc and a vertical line through the center of the horizontal straight line, and wherein the shape deviation amount has a positive sign when the shift is in the direction of a reference rotational direction, and a negative sign when the shift is in the opposite direction of the reference rotational direction; and a stator including a stator core, slots and armature windings, wherein, when the number of poles is M, the number of slots is N, M permanent magnets are sequentially numbered from first to M-th in a circumferential direction, and the shape deviation amount in the circumferential direction from a symmetrical shape for an i-th, permanent magnet is c i, including a sign, M unit vectors in total, each being in an angular direction of 2πN(i-1)/M rad, are defined, and the magnitude of the vector which is the sum of M vectors obtained by multiplying the unit vectors respectively by the shape deviation amount c i is smaller than the maximum value of the absolute value of the shape deviation amount c i of each of the M permanent magnets, wherein the rotor core has a plurality of projecting portions arranged at equal intervals in the circumferential direction on the outer periphery of the rotor core, the distance between the projecting portions adjacent to each other is larger than the width of any one of the permanent magnets, and the plurality of permanent magnets are positioned between the plurality of projecting portions, the signs of the shape deviation amount are opposite to each other for neighboring permanent magnets in the circumferential direction, and M is an integer, N is an integer and i=1, 2,..., M. a rotor including a rotor core having a polygonal shape and a plurality of permanent magnets defining magnetic poles and arranged on an outer periphery of the rotor core, the permanent magnets having a half-barrel like cross-section formed by a horizontal straight line and two vertical straight lines connected by a circular arc, wherein each permanent magnet is determined by a shape deviation amount which is a signed number, wherein the absolute value of the shape deviation amount is defined by the distance of the shift between a vertical line through the center of the circular arc and a vertical line through the center of the horizontal straight line, and wherein the shape deviation amount has a positive sign when the shift is in the direction of a reference rotational direction, and a negative sign when the shift is in the opposite direction of the reference rotational direction; and a stator including a stator core, slots and armature windings, wherein, when the number of poles is M, the number of slots is N, M permanent magnets are sequentially numbered from first to M-th in a circumferential direction, and the shape deviation amount in the circumferential direction from a symmetrical shape for an i-th, permanent magnet is c i, including a sign, M unit vectors in total, each being in an angular direction of 2πN(i-1)/M rad, are defined, and the magnitude of the vector which is the sum of M vectors obtained by multiplying the unit vectors respectively by the shape deviation amount c i is smaller than the maximum value of the absolute value of the shape deviation amount c i of each of the M permanent magnets, wherein the rotor core has a plurality of projecting portions arranged at equal intervals in the circumferential direction on the outer periphery of the rotor core, the distance between the projecting portions adjacent to each other is larger than the width of any one of the permanent magnets, and the plurality of permanent magnets are positioned between the plurality of projecting portions, the signs of the shape deviation amount are opposite to each other for neighboring permanent magnets in the circumferential direction, and M is an integer, N is an integer and i=1, 2,..., M.