Transmission for a motor vehicle, comprising a first, a second and a third planetary gear set (P1, P2, P3) and a first, second, third, fourth and fifth shifting element (B1, K1, K2, K3, K4), the selective engagement of which brings about at least eight shiftable forward gears (G1-G8) between an input shaft and an output shaft of the transmission, - the planetary gear sets (P1, P2, P3) having in each case a first element (E11, E12, E13) and a second element (E21, E22, E23) and a third element (E31, E32, E33), the first element (E11, E12, E13) being formed by way of a sun gear of the planetary gear set (P1, P2, P3), the second element (E21, E22, E23) being formed by way of a spider in the case of a negative gear set and being formed by way of an internal gear of the planetary gear set (P1, P2, P3) in the case of a positive gear set, the third element (E31, E32, E33) being formed by way of the internal gear in the case of a negative gear set and being formed by way of the spider of the planetary gear set (P1, P2, P3) in the case of a positive gear set, - the first element of the first planetary gear set being fixed permanently in a torque-proof manner, - the second element of the first planetary gear set being connected permanently to the input shaft, - the first element of the second planetary gear set being connected permanently to the first element of the third planetary gear set, - the second element of the second planetary gear set being connected to the third element of the third planetary gear set in all forward gears (G1-G8), - the third element of the third planetary gear set being connected permanently to the output shaft, - it being possible for the third element of the second planetary gear set to be fixed in a torque-proof manner by way of closure of the first shifting element, - it being possible for the input shaft to be connected to the first element of the second planetary gear set by way of closure of the second shifting element, - it being possible for the input shaft to be connected to the second element of the third planetary gear set by way of closure of the third shifting element, - it being possible for the third element of the first planetary gear set to be connected to the first element of the second planetary gear set by way of closure of the fourth shifting element, - it being possible for the third element of the first planetary gear set to be connected to the third element of the second planetary gear set by way of closure of the fifth shifting element, characterized in that the third element of the first planetary gear set is connected permanently in a torque-proof manner to a rotor of an electric machine. - the planetary gear sets (P1, P2, P3) having in each case a first element (E11, E12, E13) and a second element (E21, E22, E23) and a third element (E31, E32, E33), the first element (E11, E12, E13) being formed by way of a sun gear of the planetary gear set (P1, P2, P3), the second element (E21, E22, E23) being formed by way of a spider in the case of a negative gear set and being formed by way of an internal gear of the planetary gear set (P1, P2, P3) in the case of a positive gear set, the third element (E31, E32, E33) being formed by way of the internal gear in the case of a negative gear set and being formed by way of the spider of the planetary gear set (P1, P2, P3) in the case of a positive gear set, - the first element of the first planetary gear set being fixed permanently in a torque-proof manner, - the second element of the first planetary gear set being connected permanently to the input shaft, - the first element of the second planetary gear set being connected permanently to the first element of the third planetary gear set, - the second element of the second planetary gear set being connected to the third element of the third planetary gear set in all forward gears (G1-G8), - the third element of the third planetary gear set being connected permanently to the output shaft, - it being possible for the third element of the second planetary gear set to be fixed in a torque-proof manner by way of closure of the first shifting element, - it being possible for the input shaft to be connected to the first element of the second planetary gear set by way of closure of the second shifting element, - it being possible for the input shaft to be connected to the second element of the third planetary gear set by way of closure of the third shifting element, - it being possible for the third element of the first planetary gear set to be connected to the first element of the second planetary gear set by way of closure of the fourth shifting element, - it being possible for the third element of the first planetary gear set to be connected to the third element of the second planetary gear set by way of closure of the fifth shifting element,