Cassie Mayweather (SANDRA BULLOCK) is a veteran homicide detective whose troubled past and inability to play by the rules or follow orders has given her a bad reputation with her captain, Rod Cody (R.D. CALL), and fellow cops such as Al Swanson (TOM VERICA), who's now the new assistant D.A.
Given her repute, it's not surprising that it doesn't take her long to bed her green partner, Sam Kennedy (BEN CHAPLIN), who's transferred over from vice and is now working a murder case with her.
It seems that two high school students, Richard Haywood (RYAN GOSLING) - the charming and popular one -- and Justin Pendleton (MICHAEL PITT) - the intellectual loner - have formed an unlikely alliance where they've decided to attempt to commit the "perfect" murder and get away with it. Accordingly, they've studied how detectives and forensic science works, picked their victim, and then killed her.
When footprints at the crime scene are traced back to Richard, Cassie immediately thinks there's something fishy about him and his behavior, and has the same reaction to Justin when she meets him. When evidence leads to their patsy, Ray (CHRIS PENN), the school janitor and local drug dealer, however, everyone else thinks they've caught their man.
Cassie doesn't buy into any of that, and continues her investigation despite Sam, Cody and others telling her it's closed. As she does so, and Richard becomes jealous of Justin's interest in Lisa (AGNES BRUCKNER), a classmate of theirs, Cassie tries to get the two students to crack, all while they do what they can to get away with their crime.