Formal semantics is the study of meaning in natural and formal languages through mathematical and logical frameworks, aiming to precisely define the interpretation of linguistic expressions. It provides tools to model how language conveys information and supports the analysis of language structures in a systematic way.