NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
DEV-TOOLS...7 min read

Everything Is Logarithms

Share
NOW LET US Article – Everything Is Logarithms

An insightful exploration of the deep connections between logarithms and vectors, introducing the concept of 'baseless logarithms' as a tool for understanding mathematical units.

Everything Is Logarithms

Some connections between things, which I have not seen elsewhere. Maybe they mean something?

1. The Baseless Logarithm

Normally one writes a logarithm with a base, (\log_b (x)), to mean

[y = \log_b (x) \Leftrightarrow b^y = x]

And then you can change the base of the logarithm with

[\log_b (x) = \frac{\log_a (x)}{\log_a(b)}]

Which follows from rearranging (\log_a (x) = \log_a (b^{\log_b x}) = \log_b (x) \times \log_a (b)).

One way of thinking about what this formula does is that it is a change of units. Similar to writing (2 \text{ km} = 2000 \text{ m} / \frac{1000 \text{ m}}{1 \text{ km}}) or (5 \text{ bytes} = 40 \text{ bits}/\frac{8 \text{ bits}}{1\text{ byte}}). It says: how many copies of (b) are in (x)? It’s the number of copies of (a) in (x), divided by the number of copies of (a) that are in (b).

This is perfectly simple, but for some reason it’s hard to think about logarithms that way. The notation kind of… obfuscates things? Specifically it is hard to read (\log_b x) as “how many copies of (b) are in (x)”, because that English expression should correspond to the notation (x/b), not (\log_b x).

I found a way of thinking about logarithms which I think makes this clearer, but you have to allow a sort of odd object that I am call the baseless logarithm. It is simply a logarithm without a base:

[\log N]

which we regard as an abstract object, not a number. Then we write our normal “based” logarithm as a ratio of two of these baseless logarithms:

[\log_2 N = \frac{\log N}{\log 2}]

Note, this is already sort of a thing people colloquially do, e.g. leaving out the base of logarithms in asymptotic formulas. But I do not mean it as a shorthand. It is useful to regard it as an actual algebraic object.

We interpret (\log 2) as being the unit “bits”. To write (\log N) in bits is to factor it as a multiple of (\log 2):

[\log N = \log_2 (N) \log 2]

Then the change-of-base for logarithms follows from just writing the same geometric quantity in different units. For example (\log e) as a unit is sometimes called “nats”:

[\log N = \frac{\log N}{\log 2} \log 2 = \log_2 (N) \text{ bits} = \frac{\log N}{\log e} \log e = \ln (N) \text{ nats}]

The baseless (\log N) is sort of the multiplicative version of an object that might be familiar from discussions of vectors. It is common with vectors to distinguish between points and displacements: a displacement vector (\mathbf{v}) is given by the difference of two points (\mathbf{v} = (b) - (a)). When we write think of points as having coordinates, this involves an explicit choice of origin (\mathbf{O}), such that (\mathbf{a} \equiv (a) - \mathbf{O}) and (\mathbf{b} \equiv (b) - \mathbf{O}). Then a displacement vector is constructed by subtracting off the factors of (\mathbf{O}), (\mathbf{v} = \mathbf{b} - \mathbf{a} = ((b) - \mathbf{O}) - ((a) - \mathbf{O}) = (b) - (a)). The baseless logarithm implements the same thing but with multiplication: the value (\log N) may be thought of as (\log N / \log \mathbf{O}) for an unspecified choice of origin; turning it into an actual numeric value involves dividing two such logarithms to cancel out the origin, (\log_M N = \log N / \log M = (\log N / \log \mathbf{O}) / (\log M / \log \mathbf{O})). I think of (\log N) as the point corresponding to (N) and (\log N / \log \mathbf{O}) as its corresponding displacement vector once you pick a coordinate system. I prefer to think of the point as more fundamental.

You might ask: if we have a baseless logarithm (\log N), do we also have a “baseless exponential”? Normally (b^{\log_b N}) can be written as something like (b^{\log_b N} = b^{\ln N / \ln b} = e^{\ln N} = N); is there any way to do this without actually choosing a base? I think the answer has to be “no”. All we can say is that we have split the one object, a logarithm (\log_b N) which is the solution of (b^y = N), into two objects, (\log N) and (\log b), each of which on their own are without “units” and so have no numerical meaning. It is just like points in space: a point on its own has no operation of addition and does not have a length. We can subtract points to produce vectors (relative to a symmetry group) but not add them, and the usual operations in coordinates all require a choice of origin.

In fact there are many surprising similarities between logarithms and vectors.

2. Logarithms are Vectors

When doing vector algebra and differential geometry in a properly covariant way, we distinguish between abstract vectors and vectors in a particular coordinate system. My personal convention for this is to refer to the abstract vectors as “geometric” vectors and always write them in bold, (\mathbf{v}), whereas “coordinate” vectors, tuples of their values in coordinates, are written with an arrow over them like (\vec{v} = (v_x, v_y, v_z)). Boldface geometric vectors are always coordinate-free, whereas coordinate vectors are just collections of numbers or other objects. The geometric vector (\mathbf{v}) can be written as a dot product of its coordinates with a ‘frame’ (X = (\mathbf{x}, \mathbf{y}, \mathbf{z})) of basis vectors

[\mathbf{v} = \vec{v} \cdot X = (v_x, v_y, v_z) \cdot (\mathbf{x}, \mathbf{y}, \mathbf{z}) = v_x \mathbf{x} + v_y \mathbf{y} + v_z \mathbf{z}]

The projection of (\mathbf{v}) onto a basis vector (\mathbf{x}) is then given by ‘measuring’ the vector against the basis vector (which does not have to be of unit length). I like to write this as division because it acts a lot like division (although it’s technically pseudodivision instead):

[\frac{\mathbf{v}}{\mathbf{x}} = v_x]

That’s in my own very nonstandard notation for vector division here. The more common way to write this is to project a component of a differential (df = f_x dx + f_y dy + f_z dz) with a partial derivative, which is also the pseudodivision operation (which is incidentally the sense in which partial derivatives kinda work like division but not really):

[\frac{\partial f}{\partial x} = f_x]

I will write things in both forms to make it easy to translate between them; I do prefer my vector-division version because it avoids bringing in the irrelevant notations of differential calculus, but since the latter is actually standard I ought to include it for comparison.

Suppose (\mathbf{v}) is one-dimensional, (\mathbf{v} = v_x \mathbf{x}). Then the projection onto a ‘measuring stick’ (\mathbf{m} = m \mathbf{x}) measures its length in terms of multiples of (m):

[\frac{\mathbf{v}}{\mathbf{m}} = \frac{v_x \mathbf{x}}{m \mathbf{x}} = \frac{v_x}{m}]

Multiplying by (\mathbf{m}) again is what we mean by “writing (\mathbf{v}) in units of (\mathbf{m})”:

[\frac{\mathbf{v}}{\mathbf{m}} \mathbf{m} = \left(\frac{v_x}{m}\right) m \mathbf{x}]

In differentials, this is the differential of (f) restricted to its (dx) component:

[\frac{\partial f}{\partial x} dx = f_x dx = df \mid_{x}]

which is a perfectly interesting object (a covariant derivative) that one does not see written in this way very often. By the way, it’s not really important here, but is possible to view all measurements of the length of vectors in this way by thinking first of rewriting an arbitrary vector (\mathbf{v} = v_x \mathbf{x} + v_y \mathbf{y} + v_z \mathbf{z}) in a polar form (\mathbf{v} = v_r \mathbf{r} + v_{\theta} \boldsymbol{ heta}) and then projecting onto (\mathbf{r}), (| \mathbf{v} | = \mathbf{v}/\mathbf{r}). This tends to be a good way of looking at things.

The baseless logarithm is performing the same operation on logarithms, where (\log N) is filling the role of the geometric vector (\mathbf{v}) and (\log 2 = \text{bits}) is the unit vector or measuring stick, which takes the role of (\mathbf{x}).

[\begin{aligned} \frac{\log N}{\log 2} &= \log_2 N \ \frac{\log N}{\log 2} \log 2 &= \log_2 N \text{ bits} \end{aligned}]

In this sense baseless logarithms write numbers in coordinates in exactly the same way that measuring sticks write vectors in coordinates.

The equivalence of logarithms in different units:

[\begin{aligned} \log N &= \frac{\log N}{\log 2} \log 2 = \log_2 (N) \text{ bits} \ &= \frac{\log N}{\log e} \log e = \ln (N) \text{ nats} \end{aligned}]

is the same as the equivalence of geometric vectors in different units:

[ \begin{aligned} \mathbf{v} &= \frac{\mathbf{v}}{\mathbf{x}} \mathbf{x} = v_x \mathbf{x} \[1em] &= \frac{\mathbf{v}}{\mathbf{x}'} \mathbf{x}' = v_{\mathbf{x}'} \mathbf{x}' \end{aligned} ]

This unity reveals a beautiful perspective: mathematics is not just about dry numbers, but rather about consistent geometric structures hidden within the most familiar concepts.

© 2026 Now Let Us. All rights reserved.

Source: Hacker News

Advertisement
Ad slot ready: 5887729102

More in this category

NOW LET US Related – Steam Machine launches today

dev-tools

Steam Machine launches today

Valve's highly anticipated Steam Machines have officially launched worldwide, running on the Linux-based SteamOS. This ambitious hardware initiative aims to bring PC gaming directly into the living room, challenging traditional consoles.

NOW LET US Related – The text in Claude Code’s “Extended Thinking” output

dev-tools

The text in Claude Code’s “Extended Thinking” output

A developer discovered that Claude Code encrypts its local reasoning logs, leaving users with only a summary of the AI's thinking process. This raises transparency and auditing concerns, highlighting the limitations of proprietary AI models.

NOW LET US Related – PP-OCRv6 on Hugging Face: 50-Language OCR from 1.5M to 34.5M Parameters

dev-tools

PP-OCRv6 on Hugging Face: 50-Language OCR from 1.5M to 34.5M Parameters

PP-OCRv6 is the latest generation of PaddleOCR, scaling from 1.5M to 34.5M parameters and supporting 50 languages. It introduces architectural improvements for high-accuracy text detection and recognition with flexible deployment options.

NOW LET US Related – Codex logging bug may write TBs to local SSDs

dev-tools

Codex logging bug may write TBs to local SSDs

A logging bug in Codex continuously writes massive amounts of data to local SQLite databases, potentially reaching 640 TB per year. This high write volume can quickly exhaust the write endurance (TBW) of consumer SSDs, destroying them in less than a year.

NOW LET US Related – GLM 5.2 vs. Opus

dev-tools

GLM 5.2 vs. Opus

A head-to-head comparison between the new open-weights model GLM-5.2 and Claude Opus 4.8 in building a 3D platformer from scratch using raw WebGL.

NOW LET US Related – Deno Desktop

dev-tools

Deno Desktop

Deno Desktop, introduced in Deno v2.9.0 (canary), compiles Deno projects into self-contained desktop applications with small binaries and native performance.

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.