When does one show a function is well defined?

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)


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.