Is it legal to say $f(E)=\emptyset$ if set $E$ not in the function $f$ domain In many inverse functions, I have seen $f^{-1}(E)=\emptyset$, where the set $E$ is not in the function $f$ range.
So, is it also right to say $f(E)=\emptyset$ if set $E$ not in the function domain.
 A: 
So, is it also right to say $f(E)=\emptyset$ if set $E$ not in the function domain?

That would not be standard notation, I believe. 
In the strict form of standard notation, if you write $f(E) = \emptyset$, you're saying two things:


*

*The value $E$ is an element of the domain of $f$.

*The output value of $f$ which corresponds to an input value of $E$, is the value $\emptyset$.


If the value $E$ is not an element of the domain of $f$, then the expression $f(E)$ is an undefined expression. So, it would not be correct to say that $f(E) = \emptyset$, because that is not a true equation. (It's not a false equation, either; it's nothing more than a meaningless sequence of symbols.)
In particular, it would be completely incorrect to say that $\frac10 = \emptyset$, for example. 
Sometimes, authors use the notation $f(E)$ to mean "the image of the set $E$ under the function $f$". With this notation, if $E$ is not a subset of the domain of $f$, then the expression $f(E)$ is still an undefined expression. 
Now, there's nothing stopping you from defining $f(E)$ as "the image of the set $E \cap \text{domain}(f)$ under the function $f$". If you do, then it will be completely correct to say that $f(E) = \emptyset$ (assuming that $E$ is disjoint from the domain of $f$). But if you want to do this, you need to explicitly say that you're defining that notation that way; otherwise, you won't be understood. 
A: The inverse image notation is very much standard; in most contexts, it may be used without clarification. The image of a set under a function is almost as standard. Given a function $f : X \to Y$, when seeing $f(E)$, it is typically understood that $E$ is a subset of $X$.
That said, the convention of saying $f(E) = \emptyset$ makes some sense when $E \cap X = \emptyset$. I would just put a note before using it that you're adopting this convention, as it is not widely used.
A: The empty set $\phi$  is a well defined set. 
On the other hand if $E$ is not a subset of the domain of $f$ the expression $f(E)$ is not defined. 
Therefore in my opinion the answer is no $f(E)$ is not the empty set because it is not a set. 
A: If $f$ is specified as $f:X\to Y$, then $f$ induces two set functions:


*

*For $A\subseteq X$, we define $f(A)=\{y\in Y\mid y=f(a)\;\text{for some}\;a\in A\}$.$\\[4pt]$

*For $B\subseteq Y$, we define $f^{-1}(B)=\{x\in X\mid f(x)\in B\}$.


In particular, in this context, 


*

*The notation $f(A)$ implies $A$ is a subset of $X$.$\\[4pt]$

*The notation $f^{-1}(B)$ implies $B$ is a subset of $Y$.



As a consequence, $f(A)\ne\large{\varnothing}$ unless $A=\large{\varnothing}$.

For example, for the function $f:[0,\infty)\to\mathbb{R}$ defined by $f(x)=\sqrt{x}$, the following statements are true:


*

*$f(\large{\varnothing})=\large{\varnothing}$.$\\[4pt]$

*$f^{-1}(\large{\varnothing})=\large{\varnothing}$.$\\[4pt]$

*$f^{-1}\bigl((-\infty,0)\bigr)=\large{\varnothing}$.


however, since $(-\infty,0)$ is not a subset of the domain of $f$, it's not accepted usage to say $f\bigl((-\infty,0)\bigr)=\large{\varnothing}$.
A: Suppose our function is $f:X \rightarrow Y$. That is, our domain is $X$ and our codomain is $Y$. If $B \subseteq Y$, it is standard notation to write:
\begin{align*}
f^{-1}(B) = \{ x \in X : f(x) \in B \}
\end{align*}
As you remarked, we do not necessarily need $B$ to be a subset of the range of $f$; however, we usually do require $B$ to be a subset of the codomain of $f$.
But, this is just convention. What if we allowed $B$ to be any set? Then if we adopted the same definition as above, we would get a well-defined set $f^{-1}(B)$ for any set $B$. Moreover, elements of $B$ that were not in $Y$ would not contribute anything to the set. In short, we'd have 
\begin{align*}
f^{-1}(B) = f^{-1}(B \cap Y) \quad \text{for any }B
\end{align*}
As a consequence, if we had $B \cap Y = \varnothing$, then $f^{-1}(B) = \varnothing$ as well.

Next, for any $A \subseteq X$, it is standard notation to write:
\begin{align*}
f(A) = \{ f(x) : x \in A \}
\end{align*}
Here, this definition makes sense only when $A$ is a subset of the domain: if $x \in A$ but $x \notin X$, then $f(x)$ is not even defined!
However, if we want to use the notation $f(A)$ in the way you proposed, for any set $A$, we can just give another definition. Remark that for any set $A \subseteq X$, we in fact have:
\begin{align*}
f(A) = \{ f(x) : x \in A \} = \{ y \in Y : \exists x \in A \cap X : f(x) = y\}
\end{align*}
And note that the latter set makes sense even when $A$ is not a subset of the domain! Of course, if $A \subseteq X$, then $A \cap X = A$ and we recover the usual definition. However, if $A \cap X = \varnothing$, then this set is equal to $\varnothing$ as well.
In short, you can define the notation $f(A)$ to mean $\{ y \in Y : \exists x \in A \cap X : f(x) = y\}$ for any set $A$. This set is well defined, and fits with your idea from your question. However, it is not standard notation, so you must specify what you mean when you use it. In fact, it's not standard because it is usually not useful to consider $f(A)$ if $A$ is not a subset of the domain.

As an epilogue, I'd like to note that, in my opinion, this is more clear when we think of functions as sets of ordered pairs. Indeed, a function $f : X \rightarrow Y$ is usually defined as a subset of $X \times Y$, with a unique pair $(x,y) \in f$ for each $x \in X$.
In this context, the definitions $f(A)$ and $f^{-1}(B)$ are more naturally stated as:
\begin{align*}
f(A) &= \{ (x,y) \in f : x \in A \text{ and } y \in Y\}
\\
f^{-1}(B) &= \{ (x,y) \in f : x \in X \text{ and } y \in B\}
\end{align*}
These definitions make sense for any $A$ and $B$, and they match with the definitions I gave above.
