Step 1: Understanding the Concept:
For a function \( f:A\to B \), the set \( A \) is the domain and \( B \) is the codomain. The set of all values actually taken is \( f(A)=\{f(x): x\in A\} \), called the range or image. Every value of \( f \) lies in \( B \), so \( f(A)\subset B \) is true for every function.
Step 2: Key Formula or Approach:
A function is onto when every element of the codomain is the image of at least one element of the domain. In set language this means the range fills the whole codomain:
\[ f \text{ is onto} \iff f(A)=B \]
Step 3: Check each option:
Option (1), \( f(A)\subset B \): this holds for every function, onto or not. For example \( f:\mathbb{R}\to\mathbb{R} \), \( f(x)=x^2 \) has \( f(A)=[0,\infty)\subset\mathbb{R} \) but it is not onto. So (1) is not the condition.
Option (2), \( f(A)=B \): the range equals the codomain, so no element of \( B \) is left without a pre-image. This is exactly the definition of onto.
Option (3), \( f(A)\supset B \): all values of \( f \) already lie inside \( B \), so \( f(A) \) can never be larger than \( B \). This cannot describe an onto function.
Option (4), \( f(A)\ne B \): this says some element of \( B \) is missed, which is the opposite of onto (an into function).
Final Answer:
\( f:A\to B \) is onto exactly when its range equals its codomain. This is option (2).
\[ \boxed{f(A)=B} \]