Joy Division were an English post-punk band formed in 1976 in Salford, Greater Manchester. Originally named Warsaw, the band consisted of singer-songwriter Ian Curtis, guitarist and keyboardist Bernard Sumner, bass player Peter Hook and drummer Stephen Morris. The band was formed by Sumner and Hook after attending a 4 June 1976 Sex Pistols concert at the Lesser Free Trade Hall in Manchester. While Joy Division's early recordings were heavily influenced by early punk, they evolved a unique sound, aided by producer Martin Hannett, which earned their reputation as pioneers of the post-punk movement.
Formation
On 20 July 1976, childhood friends Sumner and Hook separately attended a Sex Pistols show at the Manchester Lesser Free Trade Hall. Both were was inspired by the Pistol's performance. The following day Hook borrowed PS35 from his mother to buy a bass guitar. Sumner said that he felt that they "destroyed the myth of being a pop star, of a musician being some kind of god that you had to worship". They formed a band with Terry Mason, who had also attended the gig. Sumner bought a guitar, and Mason a drum kit. They invited schoolfriend Martin Gresty to join as vocalist, but he turned them down after getting a job at a local factory. An advertisement was placed in the Virgin Records shop in Manchester for a vocalist. Ian Curtis, who knew them from earlier gigs, responded and was hired without audition. Sumner said that he "knew he was all right to get on with and that's what we based the whole group on. If we liked someone, they were in".  Buzzcocks manager Richard Boon and frontman Pete Shelley have both been credited with suggesting the band name "Stiff Kittens", but settled on "Warsaw" shortly before their first gig, referencing David Bowie's song "Warszawa". Warsaw debuted on 29 May 1977 at the Electric Circus, supporting the Buzzcocks, Penetration and John Cooper Clarke. They received immediate national exposure due to reviews of the gig in the NME by Paul Morley and in Sounds by Ian Wood. Tony Tabac played drums that night after joining the band two days earlier. Mason was soon made the band's manager and Tabac was replaced on drums in June 1977 by Steve Brotherdale, who also played in the punk band Panik. During his tenure with Warsaw, Brotherdale tried to get Curtis to leave the band and join Panik and even got Curtis to audition for the band. In July 1977, Warsaw recorded a set of five demo tracks at Pennine Sound Studios, Oldham. Uneasy with Brotherdale's aggressive personality, the band fired him soon after the demo sessions. Driving home from the studio, they pulled over and asked Brotherdale to check on a flat tyre; when he got out of the car, they sped off.  In August 1977, the band placed an advertisement in a music shop window seeking a replacement drummer. Stephen Morris, who had attended the same school as Curtis, was the sole respondent. Deborah Curtis, Ian's wife, stated that Morris "fitted perfectly" with the other men, and that with his addition Warsaw became a "complete 'family'". To avoid confusion with the London punk band Warsaw Pakt, the band renamed themselves Joy Division in early 1978, borrowing their new name from the sexual slavery wing of a Nazi concentration camp mentioned in the 1955 novel House of Dolls. In December, the group recorded what became their debut EP, An Ideal for Living, at Pennine Sound Studio and played their final gig as Warsaw on New Year's Eve at The Swinging Apple in Liverpool. Billed as Warsaw to ensure an audience, the band played their first gig as Joy Division on 25 January 1978 at Pip's Disco in Manchester.

Q: when did the formation happen?
A: On 20 July 1976,
Where did it happen?
show at the Manchester Lesser Free Trade Hall. Both were was inspired by the Pistol's performance.
show at the Manchester Lesser Free Trade Hall. Both were was inspired by the Pistol's performance.