Wikipedia has an article on libraries, which includes the following definition:
"In computer science, a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked."
"In computer science, a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked."
https://en.wikipedia.org/wiki/Library_%28computing%29