Who was Lamech?
There are to men named Lamech in Genesis:
(1) The name is first mentioned in Gen 4:18-24. Here Lamech, the son of Methushael, is named as the last of the descendants of Cain. He was the father of Jabel, Jubal, Tubal-cain, and Naamah.
As the husband of two wives, namely, Adah and Zillah, he furnishes the first recorded instance of polygamy.
It is very instructive to note that this "father of polygamy" at once becomes the first blustering tyrant and a braggadocio; we are fully permitted to draw this conclusion from his so-called "swordlay" (Gen 4:23 f).
He does not put his trust in God, but in the weapons and implements invented by his sons, or rather these instruments, enhancing the physical and material powers of man, are his God.
He glories in them and misconstrues the Divine kindness which insured to Cain freedom from the revenge of his fellow-men.
(2) Another Lamech. is mentioned in Gen 5:25,28 (compare 1 Ch 1:3; Lk 3:36), the son of Methuselah and the father of Noah. His words (Gen 5:29) show the great difference between this descendant of Seth and the descendant of Cain.
While the one is stimulated to a song of defiance by the worldly inventions of his sons, the other, in prophetical mood, expresses his sure belief in the coming of better times, and calmly and prayerfully awaits the period of comfort and rest which he expected to be ushered in by his son Noah.
IBSE, "Lamech" (in the public domain) with minor edits.