As a baseline, logarithms is the inverse function of an exponentiation, also known as an exponential function or an exponent. Just saying it's "the inverse function" might sound absurd, but another way to think about logarithms, which is what most people are thought, is to say: a logarithm is how many times you must multiply the base to get a set number. For example, if you have that the logarithm, with base number 10, of 100 equals x, then x has to be 2 since 10 multiplied 2 times, 10*10, is equal to 100. This would be denoted as follows:
log10(100)= x
Ergo
x = 2
Hence
log10(100) = 2
Here, log represent the logarithmic function, 10, which would normally be written in subscript, is the base, 100 is the set number and x is both the unknown value and, most importantly, the output of the operation. With letters instead of numbers, it would be:
loga(b)=x
Where a is the base, b is the set number and x is the output.
You might also see cases where the x is the set number instead, which with the previous example, would look like this:
log10(x) = 2
Meaning
x = 100
Thus
log10(100) = 2
This can be important to keep in mind when solving equations with logarithms.
Lastly, as mentioned earlier, a logarithm is the inverse of an exponentiation meaning that it is directly connect to exponents. As you might have noticed here, the logarithm acts in a very similar way to exponents. If you look at figure 1, you'll get a good overview of how it's connected to exponents and how you'll encounter them in the wild.
Figure 1: Image of the interconnection between logarithms and exponents.
Source: https://helpingwithmath.com/logarithms/
To quickly mention, the natural log functions almost exactly the same as the common log, instead of having a base, b, it has a base of Euler's number, e or approximately 2.718. The notation for naturla log is ln.
The natural log with change some values, for example the value of ln(10) is not the same as log(10) since the bases are different. The rules however, stays the same.
Just as exponents, logarithms has some rules or laws that we can follow and they're all useful when you meet logarithms in the wild, especially in equations.
The first rule in figure 1, rule 1, says that the log of two numbers multiplied with each other, is the same as the logs of each individual numbers added. For example, ln(5*4) = ln(5) +ln(4) = 2.996.
Similarly, the second rule states that the log of a number m divided by a second number n, is the same as the log of m minus the log of n. An example of this, with natural logs to avoid common base, would be ln(5/4) = ln(5) - ln(4) = 0.2231.
If we take a look at the first rule, we see that two numbers multiped, m and n respectively, is the same as adding the logs of m and n separately. But what if the numbers multiplied are the same? Well, that would give ln(m*m) which can also be written as ln(m^2). Since we know that ln(m*m) = ln(m) + ln(m), we can say that ln(m^2) = 2*ln(m). If we replace 2 with an arbitrary number k, we get that ln(m^k) = k*ln(m). With numbers, ln(5^4) = 4*ln(5) = 6.438. This is the third rule.
Both rules 4 and 5 is best understood by looking at exponents. For an exponent, we know that any number b to the power of 0 is always equal to 1. Thus, ln(1) = 0. Correspondingly, rule 5 can be seen as any number to the power of 1 is equal to itself (b^1=b), which gives ln(e)=1 (since e is the base of ln)
A good way to look at rule 6, is to apply both the third and the fifth rule. Rule 6 states that ln(e^k)=k. By first using the third rule, we get that k*ln(e)=k. Now, this makes sense if we know rule 5, and by substituting, we arrive at k*1=k, which satisfies the first equation.
The last rule, rule 7, can be looked at in many ways. You might see e^ln(k) = k and just understand, based on intuition, that it is correct, but it can be explained, as mentioned, in many ways. One of these ways is to look at the previous rules and base the answer off that. Rule 6 is quite similar (in fact, rule 7 is the inverse), which we can see by ln(e^k)=k=e^ln(k). To show this algebraicly, we can do x = e^ln(x). Take natural log of both sides, and we get
ln(x) = ln(e^ln(x))
ln(e) = 1, thus
ln(x) = ln(x)
hence
x=x
which ends up satisfying the first equation.
The Change of base formula
An important tool, especially when solving equations with logs, is the change of base formula. When solving equations with logs, you need the same base to apply the rules of logarithms. So when dealing with different bases, the change of base formula (see figure 3) is really quite useful and thus deserves its own section. It is also important to note that it works the same with natural logs, but you do not have to come up with an arbitrary number c above 1. Thus, personally, I always use naturals logs.
Figure 2: 7 of the rules of logarithms
Source: https://www.chilimath.com/lessons/advanced-algebra/logarithm-rules/
Figure 3: the logarithm change of base formula
Source: https://www.chilimath.com/lessons/advanced-algebra/logarithm-rules/