The Great Learning and The Doctrine of the Mean, two Confucian classics, originally originated from The Book of Rites. The Book of Rites is a compilation of Confucian classics from pre-Qin to Qin and Han dynasties, of which Daxue is the 42nd and The Doctrine of the Mean is the 31st.
In the Song Dynasty, during the revival of Confucianism, Neo-Confucianism paid special attention to and explained the university and the golden mean. Cheng Hao, Cheng Yi and later Zhu separated these two works and combined them with The Analects of Confucius and Mencius, forming a four-book system: University, The Doctrine of the Mean, The Analects of Confucius and Mencius.