Convex sets in R^n are ones in which the straight line between any two points is contained in the set.
If x and y belong to X, you must show that tx+(1-t)y belongs to X for all t in [0,1]
A concave function is one which f(tx+(1-t)y) >= tf(x)+(1-t)f(y)
(convex functions are the reverse if this)