SGDLibrary: a MATLAB library for stochastic optimization algorithms. We consider the problem of finding the minimizer of a function f:ℝ d →ℝ of the finite-sum form minf(w)=1/n∑ i n f i (w). This problem has been studied intensively in recent years in the field of machine learning (ML). One promising approach for large-scale data is to use a stochastic optimization algorithm to solve the problem. SGDLibrary is a readable, flexible and extensible pure-MATLAB library of a collection of stochastic optimization algorithms. The purpose of the library is to provide researchers and implementers a comprehensive evaluation environment for the use of these algorithms on various ML problems.