Sexual Idolatry

Matthew 5 vs. Luke 6

Do you believe that Matthew 5 (Sermon on the mount) and Luke 6 (Beatitudes) is Jesus preaching the same sermon or possibly Him preaching something else at a different time?

I have a hard time with if those are the same thing or different. They are ridiculously similar, but then Jesus says very similar things in obviously different contexts at times. In this case, both instances give different geographical locations (Matthew 5:1; Luke 6:17). Also the wording is slightly different in the 2 accounts (e.g. “poor in spirit” in Matthew vs. “poor” in Luke). These things make me think that it was two separate occasions. Which also makes me think that the concepts found in these passages are pretty important since Jesus apparently preached on them frequently.