# What does "well defined" mean?

On page 153 of Linear Algebra Done Right the second edition, it says:

Define a linear map $$S_1: \text{range}(\sqrt{T^*T} ) \to \text{range}(T)$$ by:

7.43: $$S_1 (\sqrt{T^* T}v)=Tv$$

First we must check that $$S_1$$ is well defined. To do this, suppose $$v_1, v_2 \in V$$ are such that $$\sqrt {T^*T}v_1 = \sqrt{T^*T}v_2$$. For the definition given by 7.43 to make sense, we must show that $$Tv_1=T v_2$$.

It is not entirely clear to me what the term 'well-defined' means here. Can someone clarify?

Thanks

• For something to be well-defined on equivalence classes, it must be shown that it is the same no matter what representative of an equivalence class is chosen Jan 15, 2021 at 19:35
• We must have that if $\sqrt{T*T}v=\sqrt{S*S}u$ then $Tv=Su$, so that the function value does not depend on the representation of the argument. Jan 15, 2021 at 19:39
• @J.W. Tanner It doesn't necessarily have to be equivalence classes to talk about well-definedness (as is this case). Jan 15, 2021 at 19:47
• Duplicate : math.stackexchange.com/questions/606917/… Jan 15, 2021 at 20:19

For a function to be well-defined, its output needs to be unambiguous. So if $$a$$ = $$b$$, then we need $$f(a) = f(b)$$. Let's look at something that's not well-defined. Let's try to define addition on the rational numbers as $$\frac{a}{b} + \frac{c}{d} = \frac{a + c}{b + d}.$$

Let's look at $$\frac{1}{2} + \frac{1}{3}$$. Under this proposed definition of addition we have $$\frac{1}{2} + \frac{1}{3} = \frac{2}{5}$$. We know that $$\frac{1}{2} = \frac{2}{4}$$. So we have $$\frac{2}{4} + \frac{1}{3} = \frac{3}{7} \neq \frac{2}{5}$$. This definition of addition isn't well-defined because our output is ambiguous.

Edit: I hope this makes sense.

Ultimately, well-defined means simply: defined, however in a special kind of defining functions. Namely, we want to define a map $$f\colon A\to B$$ in terms of given maps $$g\colon C\to A$$ and $$h\colon C\to B$$. We attempt to do so by saying that for given $$x\in A$$, we pick $$z\in C$$ with $$g(z)=x$$ and then set $$f(x):=h(z)$$. But is that really a definition of a function? We need two properties:

1. For every $$x\in A$$, there exists $$z\in C$$ with $$g(z)=x$$.
2. If there are multiple choices for $$z$$, say $$g(z_1)=g(z_2)=x$$, then $$h(z_1)=h(z_2)$$

By showing these two properties, we prove that our attempted definition is indeed a definition. In this case we say that $$f$$ is well-defined.

I'll describe well-definedness in terms of a simpler function. Let's say that I wanted to describe a function on non-zero rational numbers by $$f(p/q)=q/p$$ In this case, it falls on me to show that the value of $$f$$ at a certain rational number is independent of the way that the ratio is formed, for instance that $$f(1/2)=f(2/4)$$. If I can show that, then I can get away with defining a function whose "input" is not a single independent variable.

When authors claim that something needs to be proven to be well defined that is because the definition given is under suspicion of having some flaw: it might not define anything at all. For example:

(Fake) Definition. Let $$x$$ be the smallest strictly positive real number.

Since there is no smallest positive real number, the definition above doesn't define anything.

Most of the time, this occurs in the literature when one is attempting to define a function, as lavishly explained in several other answers, but whenever there is reason for suspicion, a definition must be proven to be ok.

A function $$f: A \to B$$ is well defined if for every $$x \in A$$, $$f(x)$$ is equal to a single value in $$B$$. So if $$f(x)$$ could equal two different values in $$B$$, then it is not well defined. Or if $$f(x)$$ is not equal to a value in the set $$B$$, then it is not well defined.

What exactly a function $$f:X\to Y$$ is? Typically we define it as a subset of $$X\times Y$$ such that for any $$x\in X$$ there is precisely one $$y\in Y$$ such that $$(x,y)\in f$$.

And so "well defined function" means: "a subset of $$X\times Y$$ we just defined is actually a function" which boils down to showing that (a) for any $$x\in X$$ there is $$y\in Y$$ such that $$(x,y)\in f$$ and (b) if $$(x,y)\in f$$ and $$(x',y)\in f$$ for some $$x,x'\in X$$ then $$x=x'$$.

Or equivalently for any $$x\in X$$ the set $$\{y\in Y\ |\ (x,y)\in f\}$$ has exactly one element.

A common example is when we deal with equivalence relationships. For example consider integers $$\mathbb{Z}$$ with the following relationship: $$x\sim y$$ if and only if $$2$$ divides $$x-y$$. Now consider the quotient set $$X=\mathbb{Z}/\sim$$ and

$$f:X\to\mathbb{Z}$$ $$f([x]_\sim)=x$$ $$g:X\to\mathbb{Z}$$ $$g([x]_\sim)=x\text{ mod }2$$

Our first $$f$$ is not well defined. Because $$[0]_\sim=[2]_\sim$$ but $$f([0]_\sim)=0$$ while $$f([2]_\sim)=2$$ are different values for the same argument.

But our $$g$$ is well defined. That's because $$[x]_\sim=[y]_\sim$$ if and only if $$2$$ divides $$x-y$$. Which is if and only if $$(x-y)\text{ mod }2=0$$ and this is if and only if $$x\text{ mod }2=y\text{ mod }2$$.