Prove this function is convex we have $ g: R^n \rightarrow R$ is a concave function and $S$={$x :g(x)> 0$} and $f:S \rightarrow R$ and $f(x)$=$1/g(x)$ so we must show that $f$ is a convex function  
 A: Since $g$ is concave and positive on $S$, for all $x,y \in S$ and $\lambda \in [0,1]$,
$$g[\lambda x + (1- \lambda)y] \geqslant \lambda g(x) + (1-\lambda)g(y)> 0.$$
For every $x,y \in S$, we have $f(x),f(y) > 0$ and 
$$f[\lambda x + (1- \lambda)y] = \frac{1}{g[\lambda x + (1- \lambda)y]} \\\leqslant \frac{1}{\lambda g(x) + (1-\lambda)g(y)}= \frac{1}{\lambda [f(x)]^{-1} + (1-\lambda)[f(y)]^{-1}} \\\leqslant \frac{1}{[f(x)]^{-\lambda}[f(y)]^{-(1-\lambda)}}= [f(x)]^{\lambda}[f(y)]^{(1-\lambda)} \\ \leq \lambda f(x) + (1-\lambda)f(y).$$
Therefore, $f$ is convex.
The following inequality -- for nonnegative $a,b$ and $0 \leqslant \lambda \leqslant 1$ -- is used above:
$$a^\lambda b^{1-\lambda} \leqslant \lambda a + ( 1 - \lambda) b.\tag{*}$$
Proof of (*).
Note that $h(t) = \lambda t - t^\lambda$ has a minimum at $t = 1$. Hence, $t^\lambda \leqslant \lambda t + 1 - \lambda$. Let $t = a/b$. Then $(a/b)^\lambda\leqslant \lambda(a/b)   + 1 - \lambda.$  Multiplying both sides by $b$, we get $a^\lambda b^{1-\lambda}\leqslant \lambda a   + (1 - \lambda)b.$
A: Read Convex Optimization by Boyd & Vandenberghe---Chapter 3 specifically, but you need to be comfortable with the first two chapters to fully digest that. There you will find a set of composition rules that govern when convexity/concavity is preserved in the composition of nonlinear functions. 
You can see a proof of one of those rules here on Math.SE, but that's not the one we want here. The rule we need to use is: the composition of a convex, decreasing (or nonincreasing) function with a concave function is convex. 
That rule is satisfied here by $f(x)=h(g(x))$, where
$$h(x)=1/x \qquad \mathop{\textrm{dom}} h=(0,+\infty)\supseteq S$$
Note that the restricted domain is important: without it, $1/x$ is neither convex nor concave. But with it, $h$ is a convex, decreasing function. So its composition with a concave function produces a convex result. 
EDIT: the OP commented: "but the question didn't say any thing about domain.so we must assume the domain is true". In a sense, this is correct. But note that the function $g(x)$ is known to be strictly positive. Therefore, my function $h(g(x))$ is exactly equivalent to $1/g(x)$, and can serve as the basis for the proof. I would say that it was an error on my part not to explicitly point this out at first. Obviously, if $g(x)$ were not known to be positive, you could not do this.
