Is the Iliad older than the Pythagorean theorem?
Interesting question! When studying ancient ideas and works of literature, it's definitely a good idea to establish some relative sense of just how old these ideas and works are.
According to a discussion from Grand Valley State University, the Iliad was created somewhere around 800-725 B.C.E. but wasn't written down until some time between 725 and 675 B.C.E.
There's disagreement about when the idea behind the Pythagorean theorem truly originated—some say it's a thousand years or more older than Pythagoras himself, going all the way back to the First Babylonian Dynasty—but we do know that Pythagoras lived from approximately 569 B.C.E. to 500 B.C.E. (Please see this discussion from the University of Arkansas for more details.)
What these dates suggest is that the epic poem Iliad is older than the Pythagorean theorem.
Keep in mind, though, that many believe that the relationships between sides of right triangles were understood well before Pythagoras lived, as this often-cited paper explains. Tentatively, then, you can conclude the geometric understanding of right triangles is probably older than the Iliad, even though the Iliad is older than the official Pythagorean theorem.