The chemical compounds of a food, quantified by GC, can be used to build relational and lineal decision rules, which merged by mathematical algorithms, could allow its characterization. The paper describes the methods applied to design and evaluate those rules, which are kept in the knowledge base of a deductive expert system, and the procedure applied to know the similarity between an unidentified sample and the food defined by the rules. The characterization of virgin olive oil of Malaga province has been used to explain the methodology. Thus, 54 chemical compounds belonging to five different series, fatty acids, methylsterols, sterols, aliphatic and triterpernic alcohols, and aliphatic and terpenic hydrocarbons, besides a group composed by a hydroxi-aldehid-triterpenic, phytol, and erytrodiol, were identified and quantified in each of the 172 samples collected over Andalusia. Their chromatograms, which were redrawn by computers, allowed to build seventeen rules among lineal and relational ones. These relational rules (10) show linguistic interrelations, such less, great, equal, etc., among two or more chemical compounds of the same or different series. On the other hand, statistical programs of discriminant analysis allowed to get the lineal rules (7) whose coefficients were taken from each one of the series, plus a rule where they were reached in the whole set of chemical compounds. Finally, twenty-six samples collected in different zones, provinces or countries, or in the same area but from different crops, were used to measure the performance of the methodology.