Is scanning a chapter from a library book illegal? I love to visit the library and read a lot of books. However I am not particularly wealthy and consciously try to limit the number of books I buy for grad school. Besides the cost, there is a chance that the books may become obsolete to my area of work in a few years. Add to that, the space they occupy and the inconvenience caused during relocation.

I generally make notes of whatever I study and like from particular books. Sometimes though, I take a scan or photocopy of some chapters that are interesting or important from exam perspective. However suddenly it occurred to me that I may be inadvertently committing a mistake here. Is it not such scans that make it to websites that make available books for illegal download? Don't universities have explicit policies that prohibit such scans or photocopying of books?

Should I be more careful from now on with such photocopying? Is the info on whether a book can be photocopied available usually inside the book? Should I look into the university policy on this and the subsequent penalty for violators?
I'm not a lawyer, but my impression is that if you are copying one or a small number of chapters, you're on very solid ground here, at least in the US. I cannot comment on the legality of copying an entire book.

Let's start with US copyright law. This is an issue of fair use. The border between fair use and what is not fair use is notoriously vague and defined I think largely by case precedent. But making a single copy of a chapter for private use seems so far from that border that it must be allowed.

From 17 U.S. Code § 107:


  Notwithstanding the provisions of sections 106 and 106A, the fair use
  of a copyrighted work, including such use by reproduction in copies or
  phonorecords or by any other means specified by that section, for
  purposes such as criticism, comment, news reporting, teaching
  (including multiple copies for classroom use), scholarship, or
  research, is not an infringement of copyright.


Second, this has been standard practice among academics for decades if not centuries. In the old days before online journals, we all had massive filing cabinets full of thousands of reprints, some obtained from authors but many photocopied from our libraries. These of course included chapters from books. No one EVER talked about this as some potential copyright violation. These filing cabinets have died away with the advent of online journals (not that I've been able to bring myself to get rid of mine), and instead people save huge numbers of pdfs on their computers. Most journal licenses explicitly allow for this, by the way. And it would difficult not to: one has to make a local copy to read it on one's machine, after all. 

To summarize, I can't imagine it ever being a problem if you copy one or a few chapters. I don't know the answer if you copy an entire book, though as far as actual risk is concerned I am unaware of a copyright police that comes and checks through one's personal filing cabinet for violations.