The chapter discusses a mathematical theory of higher cognitive functions, including concepts, emotions, instincts, understanding, imagination and intuition. Mechanisms of the knowledge instinct are proposed, driving our understanding of the world. Aesthetic emotions and perception of beauty are related to “everyday” functioning of the mind. We briefly discuss neurobiological grounds as well as difficulties encountered by previous attempts at mathematical modeling of the mind encountered since the 1950s. The mathematical descriptions below are complemented with detailed conceptual discussions so the content of the chapter can be understood without necessarily following mathematical details. We relate mathematical results and computational examples to cognitive and philosophical discussions of the mind. Relating a mathematical theory to psychology, neurobiology and philosophy will improve our understanding of how the mind works.