For the point 1)
- The domain will be: (note that this is not an interval, it is a set of two points)

-The range is the set R of all real numbers (since the line extends to infinite)
-The first graph is NOT a function
For the point 2)
-The domain will be the interval

-The range is the interval:

-The second graph is a function.