Rule 1: 1. The nominative: -u / -un
The nominative is the case of the subject of a sentence and of the predicate of a nominal sentence. An indefinite noun takes tanwīn ḍamm ـٌ (-un); a definite noun takes a single ḍamma ـُ (-u).
زَارَنِي مُعَلِّمٌ.
zāranī muʿallimun
A teacher visited me.
زَارَنِي الْمُعَلِّمُ.
zārani-l-muʿallimu
The teacher visited me.
اَلْمُدِيرُ فِي الْمَدْرَسَةِ.
al-mudīru fi-l-madrasati
The headmaster is in the school.
اَلْقَلَمُ جَدِيدٌ.
al-qalamu jadīdun
The pen is new.
Subject and predicate are both nominative.