Tell me more ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

In log-plots a quantity is plotted on a logarithmic scale. This got me thinking about what the logarithm of a unit actually is.

Suppose I have something with length $L = 1 km$.

$\lg L = \lg km$

It seems that the unit of $\lg L$ is $\lg km$, but I can also say $L = 1000 m$ and now:

$\lg L = 3 + \lg m$

This doesn't appear to have any units at all.

This suggests that $\lg km$ and $\lg m$ are actually dimensionless numbers. But wait, I can do this with any unit! Does it actually make sense to talk about the logarithm of a unit, or some other function for that matter?

share|improve this question
5  
Related (verging on a duplicate): Fundamental question about dimensional analysis. – dmckee Aug 1 '11 at 14:44
Agree with dmckee. The same logic holds: expand to Taylor series, and you see that you add ㎞ and ㎢ – MSalters Aug 2 '11 at 10:42
I think we need some examples of equations that do this, i.e. logarithms or powers of a quantity. Experience says in all equations arising from nature, the units combine to give a dimensionless number, e.g. in Planck's formula or Tsiolkovsky's rocket equation. – Mark C Sep 7 '11 at 4:54

9 Answers

up vote 10 down vote accepted

This is a fun question. I have a hard time getting a good grip on the transformation that is $ln$ so I'll write things in terms of exponents.

$$value = \ln(10\ \mathrm{ km})$$ $$e^{value} = 10\ \mathrm{ km}$$

The number $e$ is, of course, unit-less. If I raise a number to a power, what are the permissible units of the power? If I write $x^2$, I have an intuitive assumption that $2$ has no units, because it is just a count used to express $x \times x = x^2$.

Thus, I have convinced myself of Carl's answer, and I would require a logarithm to have a reference to make sense. For example:

$$e^{value} = \frac{ 10\ \mathrm{ km} }{1\ \mathrm{ km}}$$

The previous alternative of $e$ raised to a power equaling a physical quantity with real units seems like the perfect example of something that is nonsensical.

log plots

I have another question that stemmed from your question and I will try to answer it here. I specifically remember taking the derivative of log-log and linear-log plots in engineering classes. We had some justification for that, but it would appear to be nonsensical on the surface, so let's dive in. Here is an example of a log-log plot. I'll show the graph and then offer an equation of the line that is being represented.

log-log plot

I'll start writing things from the basic $y=mx+b$ form, then change things as necessary. Since I'm using an arbitrary constant, I'll fudge it whenever necessary.

$$\log(p) = a \log(m) + b = a ( \log(m) + b' ) = a \log( b'' m ) = \log( b''^a m^a ) = \log\bigg( \frac{p_0}{m_0^a} m^a \bigg) $$ $$p = p_0 \left( \frac{m}{m_0} \right)^a$$

Like magic, a recognizable form comes through. Observing a linear relation in a log-log plot really means you're observing a power fit, not a linear fit. A student may still ask "but what are a and b", which is a bit more difficult. Firstly, I did no manipulation of $a$, so you can take the meaning directly from the final form, which is to say it's an exponent and thus unitless. For b:

$$b = a b' = a \log(b'') = a \log\bigg( \frac{p_0^{1/a}}{m_0} \bigg) = \log\left( \frac{p_0}{m_0^a} \right) $$

This shows that $b$ is also unitless, but it also gives interpretation to $p_0$, which is the reference y-value at some reference x-value ($m_0$). I'll move on to linear-log plot, or a semi-log scale.

semi-log plot

I'll denote $f$ for "surviving fraction" and $d$ for dose. The equation for a regression that appears linear on the above plot will be the following.

$$\log(f) = a d + b$$ $$f = e^{a d + b} = e^b e^{a d} = f_0 e^{a d}$$

It's important to note here that $b$ had dubious units all along, just like in the log-log case, but it doesn't really matter because a more useful form comes out of the mathematics naturally. The value $f_0$ would be the baseline value (100% in this case) at $d=0$.

Summary: assuming a linear relation in log plots really makes the assumption that the actual relation follows some nonlinear form, and the units will work out once you do the mathematics, but the interpretation of the values may be nontrivial.

share|improve this answer
3  
The answer doesn't address the question. The question isn't about logarithmic plots. – Ben Crowell Aug 7 '11 at 17:50
@AlanSE: that's nice enough, but here's the thing: $$e^\text{value}=\rm{\frac{10\,km}{1\,km}}$$ implies $$\text{value} = \ln\rm{\frac{10\,km}{1\,km}} = \ln(\rm{10\,km}) - \ln(\rm{1\,km}),$$ so it seems unavoidable that taking the log of a quantity with units must be meaningful. I like to think of $\ln(\rm{10,km})$ as having units of log-kilometres. – Nathaniel Apr 10 '12 at 11:42
Continuing that thought, log-units are weird in that (for example), subtracting one log-kilometer quantity from another one results in a dimensionless quantity, whereas dividing one by the other doesn't. Log-units follow different rules from normal ones, but that doesn't mean they couldn't be a useful concept. (Though I don't actually know of anyone using them.) – Nathaniel Apr 10 '12 at 11:49
Now that I've read the whole page I see that Ben Crowell and leftaroundabout had the same idea and take it a bit further in their answers. – Nathaniel Apr 10 '12 at 11:57
@Nathaniel That's interesting, but I can still mathematically remove the $km$ from the first equation and $value$ would still seem to be unitless to me. Sure, they can be log-km units, but that doesn't change the fact that a log-km unit... is 1. Even if it has units, it doesn't follow the ordinary rules of units as you've already noticed. So it seems the more simple explanation is that it's not a unit. – AlanSE Apr 10 '12 at 12:41
show 3 more comments

Yes, logarithms always give dimensionless numbers, but no, it's not physical to take the logarithm of anything with units.

Instead, there is always some standard unit. For your example, the standard is the kilometer. Then 20 km, under the log transformation, becomes $\ln(20\;\textrm{km}\;/\;\textrm{km}\;)$. Similarly, the log of 10 cm, with this scale is
$$\ln(10\;\textrm{cm}\;/10\;\textrm{km}\;) = \ln(10\times 10^{-3} / 10^{3}) = \ln(10^{-5})$$

share|improve this answer
can you explain why it isn't physical to take the log of anything with units? – Larry Harson Aug 1 '11 at 14:15
1  
@user: See the link I put in the comments on the question which addresses that issue directly. – dmckee Aug 1 '11 at 14:45
3  
@dmckee nice link, but I was hoping to get a different view from Carl. I don't think people are getting to the heart of the question and are merely hand waving: "It's not physical to take the logarithm of anything with units" is easy to regurgitate from high-school physics. To offer physical insight into the why involves understanding. – Larry Harson Aug 1 '11 at 16:54
2  
@user2146: the 'why' is justified by the Buckingham Pi Theorem: if you see $\ln(20 \text{km})$ somewhere in a physics equation, it means that there must be a counterterm $-\ln(16 \text{km})$ somewhere else. – Gerben Aug 3 '11 at 12:41

The closest thing to "Logarithm units" are decibels, which are 10 times the base 10 logarithm of a ratio. To put any physical quantity into a decibel-like unit, you need to first divide by some reference quantity. For example, the "decibel" unit for power is "dBm", which is the ratio of the power in question over 1 mW, expressed in dB:

[dBm] = 10 log_10 (Power / (1 mW))

share|improve this answer

Here's one "mathematical" but highly unphysical answer.

Using that $km\cdot km = (km)^2$ etc, we can formally define arithmetic of numbers with units over a graded algebra $A = \oplus_{k\in \mathbb{N}} V_k$ where $V_k = \otimes^k V$ where $V$ is treated as a one-dimensional real vector space ($V_0$ is the scalar $\mathbb{R}$). The choice of unit is the choice of a basis vector in $V$. $V_0$ is the pure scalars. So for each choice of a basis vector $v \in V$, we get mapping from the infinite sequence $\mathbb{R}^{\mathbb{N}}\to A$ realizing that sequence via $(r_k) \to [r_k]_v = \sum r_k (\otimes^k v)$. We define multiplication $V_k\times V_{k'} \to V_{k+k'}$ as usual.

(We'll not define the negative power units for now. But they probably can be incorporated analogously.)

Then formally we can define $\exp: A \to A$ by the power series expansion

$$ \exp a = \sum_{k = 0}^{\infty} \frac{1}{k!} a^k $$

where $a^k$ is defined in the sense of the graded algebra. And there, we have defined what it means for $\exp$ of something with units. Change of base of $\exp$ is handled by $y^a = \exp (\ln(y)\cdot a)$. And similarly the change of units is naturally incorporated, using the fact that a change of basis on a one dimensional real vector space is just multiplication by scalars. In other words, we have $[r_k]_v = [r'_k]_{v'}$ where $r_k = s^kr'_k$ when $v = s v'$.

Using this we can formally invert the power series expansion to find what $\ln$ "should" be. Fix a unit $v$. Take $(r_k) \in \mathbb{R}^{\mathbb{N}}$ and consider $[r_k]_v \in A$. To find $\ln [r_k]_v$ we need to find $(s_k)\in \mathbb{R}^{\mathbb{N}}$ such that

$$ \begin{align} r_0 & = \exp s_0\\ r_1 & = e^{s_0} s_1 \\ r_2 & = e^{s_0} (s_2 + \frac{1}{2} s_1^2)\\ & \vdots \end{align} $$

(we can also use the Taylor expansion of $\ln$ around $1\in\mathbb{R}$ to get the expression for $(s_k)$ in terms of $(r_k)$.)

Unfortunately, even in this frame work $\ln 1 km$ is still not well-defined: in the image of $\exp$, $r_0$ is necessarily positive. Formally, it is possible to define $\ln (1 km) = $\ln (1 + (1 km - 1))$ as the rather divergent, power series

$$ \ln (1 m) = \sum \frac{(-1)^{k+1}}{k} (-1 + 1 (m))^k = \sum \frac{-1}{k} + \sum 1(m) - \sum \frac{k-1}{2} (m^2) + \cdots$$

Now some fun with divergent series: note that $\sum 1 = \sum (-1)^k(-1)^k = \sum (-1)^kx^k |_{-1}$ is the Taylor series expansion of $1/x$ around $x_0 = 1$ evaluated at $-1$, so the second term is nominally $\lim_{x\to 0+} 1/x$. So even if we regularise:

$$ \lim_{\delta \to 0+} \ln (\delta + 1m) = \lim_{\delta \to 0+} \ln \delta + \delta^{-1} m + \cdots $$

is still heavily divergent.

(Observe, that, however, $\ln (1 + 1km) = \sum (-1)^{j+1}/j (km)^j$ is well defined as a formal power series.)


So what was the point of this post? This post is primarily addressed at the conclusion that $\log m$ is a "dimensionless number" as stated in the statement of the question. While in the usual arithmetic we are taught that we cannot add apples to oranges, that is only if we take the point of view of trying to add an object in the $\mathbb{Z}$-module of apples to a separate object in the $\mathbb{Z}$-module of oranges. If you are willing to work in the direct sum module of apples $\oplus$ oranges, you can indeed add apples to oranges.

Now, implicitly in asserting that $\log$ makes sense for objects with units, (and similarly that $\exp$ makes sense for objects of units), it is necessary that we already work in a system, that of the graded $\mathbb{R}$-algebra, in which you can add a scalar (an object with no units) to a vector (some object with units). So in asserting that you want to make sense of $\log km$, you cannot conclude from it that $3$ and $\log m$ must have the same units.

share|improve this answer

The best way to think about it is that a number like 1 km consists of a dimensionless 1 multiplied by a unit, km. When you take the log of a product, you get the sum of the logs, so log(1 km) is the same as log(1)+log(km). This shows that the log of 1 km is neither a dimensionless quantity nor a dimensionful one. If it was dimensionless, then it would be expressible without reference to any system of units. If it was dimensionful, then it would change by multiplication when the system of units was changed. It's neither of these things.

share|improve this answer
1  
1 km isn't a number. 10 km consists of the number 10 and the definition of 1 in that system of units. Therefore, you decomposing log (1 km) into log(1) + log(km) lacks a sensible reason for doing so. – John McVirgo Aug 7 '11 at 20:38
3  
@John McVirgo: "1 km isn't a number." Different people have different ways of thinking about this. Mathematicians would typically say that in x=1 km, 1 is the value of x, and the "km" is part of the definition of x. Scientists usually consider the "km" to be part of the value of x. This can all be formalized, e.g., you can define a group of SI units under multiplication, which is isomorphic to a three-dimensional vector space with one basis vector for each SI base unit. – Ben Crowell Aug 8 '11 at 15:26
I found this to be a clever answer :) – AlanSE Aug 26 '11 at 12:24

It is something that's neither a physical quantity nor a dimensionless number, but something that can just be described as logarithm of a physical quantity. There is not much problem with this: let $\mathcal{P}$ be the space of physical quantities. We can span this space in a vectorspace-like manner by base-physical units (eg. SI) as described by Willie Wong. What's important: we know that we can't perform certain operations in this space, for instance we cannot add a mass to an electrical current. Addition of quantities $a,b\in\mathcal{P}$ is only defined if $a$ and $b$ have the same dimension, that is, if $\exists x\in\mathbb{R}$ such that $a=xb$. Multiplication is always defined and always yields a physical quantity again. (This also defines powers of physical quantities, but not what, say, the exponential of one of them is.)
We then know that $\mathbb{R}\subset\mathcal{P}$, since for, say, two lengths $a,b\in\mathcal{P}$ the ratio $\tfrac{a}b$ will be a dimensionless number. For these dimensionless quantities, the logarithm is defined right from the start.

It's quite simple to extend this to a full space $\ln\!\!\mathcal{P}\supset\mathbb{R}$: for $a\in\mathbb{R}\subset\mathcal{P}$, the logarithm is defined as usually. For $a\not\in\mathbb{R}$, we define the logarithm axiomatically: first we require $\ln\!\!\mathcal{P}$ to be an abelian group WRT addition, even a vector space over $\mathbb{R}$. Then, for $\lambda\in\mathbb{R}$, $$\begin{align} \ln(a^\lambda) &:= \lambda\ln(a) \end{align}$$ and for $b\in\mathcal{P}$, $$ \ln(ba) := \ln(b) + \ln(a). $$ Provided that $a$ and $b$ have the same dimension and therefore can be added, this already tells us the logarithm of the sum: we know that then $\exists x\in\mathbb{R}\colon b=ax$, in other words we can write any sum of physical quantities as a product of one of them with a real number, so the logarithm of any length cooks down to the logarithm of any one particular length, plus the logarithm of the ratio between the lengths.

Coming back to your question: what is the logarithm of a kilometre? The answer: $\ln(1\:\mathrm{km})=\ln(\mathrm{km})$. If you treat kilometres as the basis unit of length, then this is all you need. If you prefer metres or inches or whatever, you just get $$ \ln(1\:\mathrm{km}) = \ln(1000\:\mathrm{m}) = \ln(1000) + \ln(\mathrm{m}) $$ $$ \ln(1\:\mathrm{km}) = \ln(\tfrac{1\:\mathrm{km}}{1"}\:\mathrm{"}) = \ln(\tfrac{1\:\mathrm{km}}{1"}) + \ln(\mathrm{"}) \approx 10.58 + \ln(\mathrm{"}) $$ Here, $\ln(\mathrm{km}),\ln(\mathrm{m}),\ln(\mathrm{"})$ are not dimensionless numbers. Rather think of them as elements of a vector space that has the real numbers as a subspace.

share|improve this answer

First, the question is a little ill-posed. In a log plot, for example, the quantities are (log X) km, not log(X km). We need to define the question further: What does it mean to "take a logarithm"? The logarithm, or any such function, is defined to take a real or complex number and give a new number based on a certain rule. Giving it something other than a number is a little like asking "How much does the number three weigh?"; it does not make sense because the function that gives the weight of an object does not accept numbers.

(Consider physical equations that involve physical quantities as arguments of logarithms, trigonometric functions, or as exponents. Experience tells us that, in equations arising from nature, the units of quantities within exponents and functions always combine to give a dimensionless number. Any meaningful expression must come from physical reasoning, so you would need to arrive at this question from physical reasoning as well..)

As Ben Cromwell noted in his comment, I am sure there are ways of representing units in mathematics.

share|improve this answer

My two cents is that this is a classic mix up of meta levels.

A kilometer is a measure on the ground of the earth. When we make a map, a meta level to the actual measure, the length on the map is maybe 1cm per ten kilometers, and we take that in our stride not wondering how it is possible. It is possible because we have very clearly the concept of the map being a meta level.

Suppose we make the map on a logarithmic scale ( funny maps of the globe exist depending on functions). This would mean that what would be marked as a kilometer on this map will be getting logarithmically larger as the real (non-meta) data increase in kilometers. The reason one uses meta levels for quantities that have units is for convenience, projecting the globe on a plane is convenient for what we want to do, though it distorts the relative size of the kilometer on the map , which our "intuition" wants constant.

When we are dealing with exponents and logarithms in physics equations we are very careful to have dimensionless numbers there. It is actually one of the tools, balancing units. Study the Boltzmann distribution as an example.

share|improve this answer

Logarithmic function is readily used for transformation from one scale to another. Infact a scale/unit is a measurement and hence dimentionless, but to construe in physical sense we appropriate a unit relative to a absolute standard for the value to make sense and be reproducible. Thus answering your question. Log (x) is unitless, for all the mathematical operation performed are intrinsically unitless.. For better understanding i would like to give an imaginary example: "When i go running with my friend the distance between us is proportional to the speed my friend runs at" In this example the units on either side of equality are entirely arbitary depending on the formulation of situation it could well be dimentionless--m/s or lets say weather then celsius--m/s !

Hope this helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.