# When does one show a function is well defined?

Sometimes in Linear Algebra, we just use linear transformations, and other times we have to check to make sure they are well defined. Since I'm not an experienced mathematician or anything, I can't seem to see the fine line between needing to show if a linear transformation is well defined or not. Could anyone who understands the nuance please explain it to me?

Edit: For example, when we began working with quotient spaces we had to show addition was well defined. In problems, if we wanted to construct a linear transformation from a quotient space to a vector space, we had to show that the linear transformation was well defined and linear. In the past, however, when we constructed linear transformations between vector spaces, we just had to show that they were linear, and we didn't talk about it being well defined.

• You might want to include some examples in your question, so answerers can refer to those and know what you really are asking about. Mar 23 '20 at 17:18
• Cf. Wikipedia; a classic situation is when a function is defined on classes, and it must be shown that it is the same for all representatives of a class Mar 23 '20 at 17:31
• I added a little more clarification the question, thank you
– Bam
Mar 23 '20 at 17:38
• The short answer is : always. Except that very often, functions you define are compositions of other functions and so their well-definedness just follows from that of composition, and that of the other functions that you already know are well-defined. Since these are then "obviously" well-defined, the question is swept under the rug and not mentioned. This becomes much less clear with, e.g. quotient spaces, where you often define maps on a class by saying what it does to a representative. There you have to explicitly check Mar 23 '20 at 17:45
• See some comments here. Mar 23 '20 at 18:18

You need to show a function is well-defined when its definition involves some arbitrary choice. To illustrate this, imagine we have three functions $$f,g, h: \{\text{high schools in your city}\} \to \{\text{people}\}$$.

$$f$$ is "defined" as follows: if $$x$$ is a school, take a student, $$y$$, from that school. $$f(x)$$ is defined to be $$y$$'s father.

$$g$$ is defined as follows: if $$x$$ is a school, take a student, $$y$$, from that school. $$g(x)$$ is defined to be $$y$$'s principal.

$$h$$ is defined as follows: if $$x$$ is a school, take a student, $$y$$, from that school. $$h(x)$$ is defined as $$y$$'s current math teacher.

There is a problem with the definition of $$f$$. Namely, it depends on what student you pick from the school. You didn't specify how to choose the student, so the "function" isn't well defined---any given input doesn't correspond to exactly one output.

On the other hand, high schools students from the same school all have the same principal, so $$g(x)$$ is well-defined.

Now what about $$h$$? Well it depends. If the school has multiple math teachers, it isn't. But maybe each school has exactly one math teacher who teaches all the students. It's possible $$h$$ is well-defined, but it might not be depending on the circumstances. If you want to use the function in a mathematical context, you need to show that it actually makes sense.

Now back to linear algebra. If you're constructing a function from a quotient space, your probably did something like this:

take an element from the quotient space $$V/W$$. This has the form $$v +W$$ for some $$v \in V$$ (ie the coset of $$v$$). Now [do something with $$v$$] to get the value $$f(v + W)$$.

There is a potential problem with this definition: the coset $$v + W$$ can likely be represented by many different choices of $$v$$, but we define its image in terms of a single representative. There's a chance our definition depends on this choice, so we need to check that it doesn't in order for our function to make sense.

(To make an analogy with the above, the cosets are schools, the different $$v$$'s which represent cosets are the different students which might schools)

• The school analogy is very nice. Mar 23 '20 at 17:50

Here is a linear algebra example.

Let $$V$$ be a finite dimensional vector space, say with $$V= \operatorname{span}(e_1, \dots, e_n)$$. Consider arbitrary vectors $$v_1, \dots, v_n \in V$$ and define a map. By our assumption, we can write every vector $$v\in V$$ as a sum

$$v= \sum_{i=1}^n a_i e_i$$

with $$a_1, \dots, a_n \in \mathbb{R}$$

$$f: V \to V:v=\sum_{i =1}^n a_i e_i \mapsto \sum_{i=1}^n a_i v_i$$

Is this well-defined? This is obvious you will say! But in fact it is not obvious and this is not even well-defined. Indeed, suppose that we can write $$\sum_{i=1}^n a_i e_i = \sum_{i=1}^n b_i e_i$$ where $$a_i \neq b_i$$ for some $$i$$, or equivalently when $$\{e_1, \dots, e_n\}$$ is linearly dependent. Then $$f$$ is not well-defined as it is not clear that we should assign the value $$\sum_{i=1}^n a_i v_i$$ or $$\sum_{i=1}^n b_i v_i$$ to $$f(v)$$.

So, if there are choices made to define an object, you must try to show that the $$f$$-value is invariant under all these choices. Then your map will be well-defined.

Of course, there is no rule that works in general.