Rule 1: 1. Ordinals are adjectives
From second to tenth the ordinal is فَاعِلٌ built on the root of the cardinal (خَمْسَةٌ → خَامِسٌ); sixth shows the older root س د س, سَادِسٌ. First is أَوَّلُ, feminine أُولَى, a diptote. ثَانٍ ends in a weak letter: اَلثَّانِي with the article, ثَانٍ without it. The ordinal follows its noun and agrees in gender, case and definiteness. It may also stand first as an iḍāfa with an indefinite noun: أَوَّلُ يَوْمٍ the first day, ثَالِثُ دَرْسٍ the third lesson.
اَلدَّرْسُ الْأَوَّلُ سَهْلٌ وَالدَّرْسُ الْعَاشِرُ صَعْبٌ.
ad-darsu-l-awwalu sahlun wa-d-darsu-l-ʿāshiru ṣaʿbun
The first lesson is easy and the tenth lesson is difficult.
قَرَأْتُ الصَّفْحَةَ الثَّانِيَةَ وَالصَّفْحَةَ الثَّالِثَةَ.
qaraʾtu-ṣ-ṣafḥata-th-thāniyata wa-ṣ-ṣafḥata-th-thālithata
I read the second page and the third page.
Accusative agreement.
صَفِّي فِي الطَّابِقِ الرَّابِعِ.
ṣaffī fi-ṭ-ṭābiqi-r-rābiʿi
My classroom is on the fourth floor.
Genitive agreement after فِي.
هٰذَا أَوَّلُ يَوْمٍ فِي الْمَدْرَسَةِ وَذٰلِكَ آخِرُ يَوْمٍ.
hādhā awwalu yawmin fi-l-madrasati wa-dhālika ākhiru yawmin
This is the first day at school and that is the last day.
Ordinal in iḍāfa; آخِرُ 'last' behaves the same way.
هِيَ التِّلْمِيذَةُ الْأُولَى فِي صَفِّهَا.
hiya-t-tilmīdhatu-l-ūlā fī ṣaffihā
She is the first pupil in her class.