Along with John Bardeen and Walter Houser Brattain , Shockley co-invented the transistor , for which all three were awarded the 1956 Nobel Prize in Physics .