Revenue from external sales of the primary aluminum segment increased by 66.1% from RMB47,336.8 million for the year ended December 31, 2020 to RMB78,613.8 million for the year ended December 31, 2021, primarily due to an increase in the average external selling prices for our self-produced primary aluminum.
Revenue from inter-segment sales of primary aluminum segment increased by 17.1% from RMB34,068.5 million for the year ended December 31, 2020 to RMB39,899.7 million for the year ended December 31, 2021, primarily due to the year-on-year increase in sales price of primary aluminum.
Cost and expenses. The total cost and expenses for our primary aluminum segment increased by 36.4% from RMB77,542.6 million for the year ended December 31, 2020 to RMB105,729.7 million for the year ended December 31, 2021, primarily due to an increase by 21% in the price of alumina, the main raw material of primary aluminum, and an increase by 25% in the price of electricity.
Segment results. We had a segment profit of RMB12,783.8 million for the year ended December 31, 2021, increasing significantly from a segment profit of RMB3,862.7 million for the year ended December 31, 2020. This was mainly due to the year-on-year increase in the gross profit of our primary aluminum products.
Trading Segment
Revenues. Total revenue generated by the trading segment increased by 38.5% from RMB182,510.0 million for the year ended December 31, 2020 to RMB252,704.9 million for the year ended December 31, 2021, primarily due to an increase by 20% and 35% in the average selling prices for alumina and primary aluminum, respectively, an increase by 43% in the average external selling prices for copper and an increase by 49% in the volume of external sales of copper in 2021 as compared to that in 2020.
Revenue from external sales of the trading segment increased by 42.8% from RMB136,248.7 million for the year ended December 31, 2020 to RMB194,542.3 million for the year ended December 31, 2021, primarily due to an increase by 35% and 6% in the average external selling prices and the volume of external sales of primary aluminum, respectively and an increase by 43% and 49% in the average external selling prices and the volume of external sales of copper, respectively, in 2021 as compared to that in 2020.
Revenue from internal sales of the trading segment increased by 25.7% from RMB46,261.3 million for the year ended December 31, 2020 to RMB58,162.6 million for the year ended December 31, 2021, primarily due to an increase by 19% in the internal selling price for our alumina, and an increase by 79% in the revenue of internal sales of raw materials and fuel in 2021 as compared to that in 2020.
Cost and expenses. The total cost and expenses for our trading segment increased by 38.3% from RMB181,739.9 million for the year ended December 31, 2020 to RMB251,368.6 million for the year ended December 31, 2021, primarily due to an increase by 20% and 35% in the average procurement cost of alumina and primary aluminum, respectively, and increased procurement cost corresponding to an increase by 43% and 49% in the average external selling prices and the volume of external sales of copper, respectively, in 2021 as compared to that in 2020.
Segment results. Our segment profit increased significantly from RMB770.1 million for the year ended December 31, 2020 to RMB1,336.3 million for the year ended December 31, 2021. This was mainly due to the year-on-year increase in the gross profit of our alumina and primary aluminum products.
Energy Segment
Revenues. Total revenue generated by the energy segment increased by 10.2% from RMB7,184.2 million for the year ended December 31, 2020 to RMB7,915.2 million for the year ended December 31, 2021, primarily due to the year-on-year increase in coal price.
Revenue from external sales of the energy segment increased by 10.6% from RMB6,940.4 million for the year ended December 31, 2020 to RMB7,674.6 million for the year ended December 31, 2021, primarily due to the year-on-year increase in coal price.
Revenue from internal sales of the energy segment was RMB240.6 million for the year ended December 31, 2021, which remained stable compared to RMB243.8 million for the year ended December 31, 2020.
Cost and expenses. The total cost and expenses for our energy segment increased by 12.2% from RMB7,261.4 million for the year ended December 31, 2020 to RMB8,150.0 million for the year ended December 31, 2021, primarily due to an increase in the procurement costs for certain thermal power companies resulting from increased price of coal.