An <math>[n, k, d, r]_{q}</math>-LRC <math>C</math> is sai to be optimal if the minimum distance of <math>C</math> satisfies <div style="text-align: center;"><math>d = n - k - \lceil\frac{k}{r}\rceil + 2</math></div> By rewriting this new bound as <div style="text-align: center;"><math>d \leq n - k + 1 - ( \lceil\frac{k}{r}\rceil - 1)</math></div> we can see that some of the maximum possible minimum distance is sacrificed to obtain the locality <math>r</math> in our code.
A locally recoverable code is a linear code such that there is a function that takes set of coordinates of a codeword and some specific coordinte and outputs an appropriate coordinate.