Although no documents state the motivation for the pencil's invention, it was likely first created as an alternative to pens. According to Pencils.com, the first known pencils were developed shortly after the discovery of a graphite deposit in Borrowdale, England, in 1564.
When pencils were invented, pens required a separate inkwell, so pencils provided a more mobile writing solution. Pencils don't smear and may make writing easier to learn. The discovery of large graphite deposits and sophisticated manufacturing made pencils a cheaper alternative to pens. Pencils are now widely used in schools across the globe due to their low cost and convenient erasers.