# What is the difference between codomain and range?

My book says that if there is a linear transformation $$T: V \to V'$$, then $$V'$$ is the codomain of $$T$$ but it also says that $$T[V]$$ is the range of $$T$$. $$T[V]$$ the same as $$V'$$?

• $T(V)$ is the set of outputs of $T$. But if $T$ is not surjective, then $T(V)$ is a proper subset of $V'$. As an extreme example, let $V$ be a nontrivial vector space and let $T:V\to V$ be the zero map. Aug 9, 2019 at 3:44
• You may wish to read WikiDiff's Codomain vs Range - What's the difference?. Aug 9, 2019 at 3:44
• mathsisfun.com/sets/domain-range-codomain.html provides a simple intuitive explanation of range and codomain.
– rtob
Aug 9, 2019 at 3:58
• – Shub
Jun 24, 2021 at 12:19

The codomain and range have two different definitions, as you have already stated. The range is the set of values you get by applying each value in the domain to the given Relation.

Range = $$\{ T(v)$$ for every $$v$$ in the domain$$\}$$

The codomain is a set which includes the range, but it can be larger. The range is a subset of the codomain. • Excellent image - almost a "proof without words". Aug 9, 2019 at 13:51
• @FWDekker Because the range is depend on the domain while the codomain does not depend on anything. Say you have a function f = 2x, and you have a restricted domain of integer from 0<x<10. Then the range is 0<f(x)<20. But you can't say that the codomain of f is 0<f(x)<20, because you totally can get a value higher than 20 if you get a different domain. So the range is attached to the domain while the codomain consists of all possible elements that the function can produce with any arbitrary domain. Jan 20 at 17:09
• I did not assert that the codomain of f(x)=2x is integer. I say that it includes the sets of images for any domains. Thus, the codomain of f(x)=2x does not limit to integers; it can be any number, while the range is limited to integers since the domain that we choose are integers. When a function is defined, you get to pick your domain and codomain, so the codomain may consist of elements that are not an image of any elements in the domain. The range is all the elements that are an image of at least an element in the domain. The range is a subset of a codomain, and it can be equal to range. Jan 21 at 11:36
• @FWDekker Your last 2 seconds state the exact same thing that I was trying to say. You said that the range is the mapping of the entire domain, which implies what I said: "The range depends on the domain". If you pick a different domain, the range would also be different. Btw, I am not aware of any term that refers to the set of all possible domains applicable to the function, because a function is defined with its domain. When we pick a different domain, it becomes a different function. Jan 21 at 11:43
• @FWDekker Yes, you are right, it can be arbitrary, but sometimes it is not, I will give an example. Let's say you have two sets, a set of students and a set of grades. S = {Tony,John,Bob,Jennie}, G = {A,B,C,D,E,F}, f is a function that maps S to G, hence f : S → G. f(tony) = A, f(John) = C, f(Bob) = D, f(Jennie) = A. In this case, the codomain is {a,b,c,d,e,f} and range is {A, C, D}. Now, you could have chosen {A,C,D} as the codomain, but it wouldn't be so useful when u try to use the function for students from other classes. The range only applies to that specific class. Jan 22 at 13:37

Consider a linear map $$T:\mathbb{R} \to \mathbb{R}$$ given by $$T(x) = 0$$ for all real $$x$$.

It's clear $$T$$ is linear. The codomain is indeed $$\mathbb{R}$$, but the range of $$T$$ is all points in the co-domain where $$T$$ maps something, so range of $$T$$ is $$\{0\}$$.

The codomain need not be the same as the range. Take any projection operator like $$\begin{bmatrix}1&0\\0&0\end{bmatrix}$$; its codomain is $$\mathbb R^2$$ but its range is only the subspace spanned by $$(1,0)^T$$.

However, it is always true that $$T(V)\subseteq V'$$ and that the transformation can be restricted to its range ($$T': V\to T(V)$$) such that range and codomain are equal.

Codomain is a set which the images must belong to.

Range is the set which the images exactly belongs to.

https://en.wikipedia.org/wiki/Range_of_a_function

In mathematics, the range of a function may refer to either of two closely related concepts:

• The codomain of the function
• The image of the function

...

As the term "range" can have different meanings, it is considered a good practice to define it the first time it is used in a textbook or article. Older books, when they use the word "range", tend to use it to mean what is now called the codomain. More modern books, if they use the word "range" at all, generally use it to mean what is now called the image. To avoid any confusion, a number of modern books don't use the word "range" at all.