This is a textbook on electromagnetics for undergraduate students in electrical engineering, information, and communications. The book contents are very compact and brief compared to other commonly known electromagnetic books for undergraduate students and emphasizes mathematical aspects of basic electromagnetic theory. The book presents basic electromagnetic theory starting from static fields to time-varying fields. Topics are divided into static electric fields, static magnetic fields, time-varying fields, and electromagnetic waves. The goal of this textbook is to lead students away from memorization, but towards a deeper understanding of formulas that are used in electromagnetic theory. Many formulas commonly used for electromagnetic analysis are mathematically derived from a few empirical laws. Physical interpretations of formulas are de-emphasized. Each important formula is framed to indicate its significance. Primary Theory of Electromagnetics shows a clear and rigorous account of formulas in a consistent manner, thus letting students understand how electromagnetic formulas are related to each other.