Of the 1200 books in the library, there are 3 times as many books in the fiction section as are in the nonfiction section. Also, there are 400 more books in the reference section than are in the nonfiction section. How many books are in each section?

Let x be the number of books in the nonfiction section.

The fiction section has 3*x books.
The reference section has x+400 books.
The total number of books is x+3*x+x+400=1200 books.
Combining like terms, we get 5*x+400=1200 books.
Subtracting 400 from both sides, we get 5*x=800 books.
Dividing both sides by 5, we get x=<<160=160>>160 books.
The fiction section has 3*160=<<3*160=480>>480 books.
The reference section has 160+400=<<160+400=560>>560 books. Answer: \boxed{160, 480, 560}.