The first image showcases the katana, a symbol of discipline and loyalty that defined the samurai's warrior code. The second image illustrates the three principal ranks: Gokenin, Goshi, and Hatamoto, that shaped their duties and status in Japan’s feudal society.
As previously mentioned, samurai were elite warriors who fought for Japan. They were employed by their feudal lords (daimyo) to fight for them as part of a higher social class due to their status as powerful landowners Shoguns could also hire samurai and make them serve for them.
Since samurai held a very high class during the Heian period, they still were below daimyos and shoguns who held the real power of military affairs. Their primary duty was to defend the daimyo and his lands against attacks from hostile tribes, enemies, and rivals.
Samurai were distinguished by their range of weapons they used including spears, bows, and later firearms, but they were most famous for their swords, especially the katana. More than just a weapon, the katana identified them for who they were as well as their discipline, status, and expertise in fighting.
In return for their combat service and protection, samurai were granted privileges such as wealth, higher status, food, and shelter. Due to frequent battles and conflicts, samurai lived in barracks, castles, or private homes, depending on their role and status. There were three principle ranks for each samurai depending on which group they belonged to, they were required to meet these rules.
Gokenin: Referred to as housemen, held the lowest rank in the samurai hierarchy. They served the shoguns and daimyos during medieval Japan. They were granted lands in exchange for loyalty.
Goshi, known as rustic warriors, were permitted to farm their own land, but lacked the privilege of carrying two swords because that was the right of a full ranked samurai.
Hatamoto were the Guardian of the Banner and held the highest rank. These warriors had the duty of defending their lord's interests, even at the cost of their own lives. This involved committing seppuku for the sake of their dignity.