An expert system is a computer program that contains knowledge from human experts to solve complex problems in a specific domain. It has four main components: a knowledge base of facts and rules, an inference engine that applies rules to facts to derive new facts, a user interface, and an explanation facility. Expert systems were developed in the 1970s to apply human expertise to problems. They have limitations but can also explain their reasoning, draw complex conclusions, and provide portable knowledge to help humans. Common applications of expert systems include medical diagnosis, materials identification, and credit approval.