Ontology is a formal representation of knowledge as a set of concepts within a domain, and the relationships between those concepts. Those concepts and relationships create graph-structures and can be described by the lattice theory or other mathematical models.