<human>:  Who invented the transistor and when?
<bot>: The first transistor was invented by John Bardeen, Walter Brattain, and William Shockley in 1947. The transistor is a semiconductor device that is used to amplify or switch electronic signals. It is the basic building block of modern electronics, and is used in nearly every electronic device you use.