A library in solidity is a singleton that is deployed once and can be called from any contract. A library in solidity does not have storage and cannot hold Ether. This helps a lot in avoiding duplicate code in the Ethereum blockchain (saves a lot of gas by not deploying the same code again).
In this recipe, you will learn to create, deploy, and interact with libraries using solidity.