I haven't seen the Will Smith version of LMOE yet.
Matheson's original novel was called I Am Legend
, not The Last Man on Earth
. The Smith movie is the only adaptation that didn't change the title, although it apparently changed a whole lot else, including the ending.