Domain and Range

Put simply, the domain represents the inputs to a system or a function. The range is the set of outputs that the system or function will produce when given the inputs to the system.

Engineering Context

Knowing why we are learning about domain and range as engineers is important. Here is some context for why your major learns about the domain and range!

MAE: Orientation of aircraft and spacecraft are often given with respect to Euler angles. The relationship between the angular rates of an aircraft and the time rate-of-change of the Euler angles is given by

$$ \begin{bmatrix} \dot{\phi}\\ \dot{\theta}\\ \dot{\psi}\end{bmatrix} = \begin{bmatrix} 1& \underline{\sin\phi \sin\theta / \cos\theta}& \underline{\cos\phi \sin \theta / \cos \theta}\\ 0& \cos \phi& -\sin\phi\\ 0& \underline{\sin\phi / \cos\theta}& \underline{\cos\phi / \cos\theta} \end{bmatrix} \begin{bmatrix}p\\ q\\ r\end{bmatrix} $$

where the Euler angles are φ , θ , and ψ and the angular rates of the aircraft are p , q , and r .

Since the term cos θ is in the denominator of the underlined terms, we can see that the domain of this functional relationship is restricted to regions where θ ≠ kπ where k = 1, 3, 5, … One situation where this formulation does not work, then, is when the aircraft or spacecraft flies with its nose pointed straight upward.

So we can see how important it is to understand the limitations of this method of describing an aircraft's orientation!

ECE: When designing a linear control system, the reachable subspace represents the set of states that the system is capable of reaching when starting from the origin. We denote this subspace R t 0 t 1 .

If a state x1 is in the reachable subspace, then we must be able to design a controller to reach that state. It turns out that we can determine the reachable subspace using a matrix called the reachability Grammian, denoted W R t 0 t 1 .

The reachable subspace is defined as

$$ \mathcal{R}[t_0, t_1] = \mathrm{Im}\left(\mathcal{W}_R[t_0, t_1]\right) $$

where Im is the image of the matrix, which is the same as the range that we have described above! Thus, being able to determine the range of a function (or linear operator, like a matrix) is incredibly important for electrical engineers!

BENG:

CEE:

A Deeper Dive

A function is defined as follows:

Definition: A function from a set D to a set Y is a rule that assigns a unique (single) element f(x) ∈ Y to each element x ∈ D.

Referring to our definition of a function given above, the set D represents the domain of the function. It is the set of inputs accepted by the function and is therefore a part of how we define a function. Thus, returning to Ohm's law, we know that the resistance of the conductor must be nonzero and physically we know that the resistance should be positive. From this information, we should refine our definition as

$$ I = \frac{V}{R},\quad V\in\mathbb{R},\quad \{R \in \mathbb{R} \;|\; R > 0\} $$

By writing Ohm's law this way, we have defined its domain D to be every real value of V and every non-negative value of R.

The range is the set of values that a function can output and was defined in our definition of a function to be the set Y. By this logic, with a function and domain defined, the range is also defined. According to the domain above for Ohm's law, we know that the denominator will always be positive and that V can be either positive or negative. Therefore, the current, which is the output of the function, can assume all positive or negative real numbers. We can write this as

$$ \mathrm{Range}(I) = Y \in \mathbb{R} $$

Unlike the domain, which is part of the definition of the function, the range is a result of a given function and its domain, thus it is not required as part of a function definition.

Finally, the term codomain is sometimes used in engineering literature. Like the domain, the codomain is part of the function definition and it represents the set of values that are considered potential candidates for the output of a function. For example, in Ohm's law, we could define the codomain as the set of all real and complex numbers, C, which is a larger set than the range of the function that we have defined. So long as the range is a subset (fits completely) inside the codomain, the codomain is valid for the function.

Let's give one last (admittedly rather contrived) example. Suppose we want to make a peanut butter and jelly sandwich. Our candidate function is given as PB + J + B = PB&J and our domain is all the possible peanut butter, jams, and breads that can be used to make our sandwich. We are planning on making a sandwich, so our codomain can be defined as a set of all of the sandwiches. Specifically, our function will only give us peanut butter and jelly sandwiches, and therefore those are our range. Each value of our domain will give us a unique peanut butter and jelly sandwich and therefore we know that the equation we have defined is indeed a function.

Domain Range PBJ