Specifically, or "logarithm to base a of x" is defined as the "inverse function" to . That is, each "undoes" the other: and .

Your "lg" is an abbreviation for the "common logarithm" or "logarithm base 10", which is the inverse to . for all x (and so for x= 5 ). for all positive x (and so for x= 5 .

"ln" is an abbreviation for the "natural logarithm" or "logarithm base e" (e is about 2.718...) which is inverse to . for all x (and so for x= 5 . for all positive x (and so for x= 5 .)

(Note the difference between "for all x" and "for positive x". The function " is only defined for positive a and always has a positive value- that is, is a function from the set of all real numbers to the set of all positive real numbers. It's inverse, , is a function from the set of all positive real numbers to the set of real numbers.)