How would a Linear Gray Level Transform affect an image?
The graph you've shown above describes a pixel-wise operator, basically a function which maps input pixel values $r$ to a new value $s$ in the output image. i.e. each of the functions in the figure you provided describes a transformation $s = T(r)$. 

These transformations are typically used to improve image contrast through histogram equalization, basically spreading out the pixel values to make it easier for us to distinguish objects in the image. 

To implement something like this, you have to iterate through every pixel, get its grey level $r$, and replace this value with the output $s$ of the function $T(r)$. 

For converting color to greyscale, it's the same idea, although this time your function $s = T(r, g, b)$ has three inputs (r = red, g = green, b = blue), since each pixel in a color image will return these three values. Implementation is the same, just iterate through every pixel and replace these three values with just one value $s$ based on the function. 

While the identity transform above (given by $s = T(r) = r$) is linear, linear transformations do not necessarily mean identity. 

An example of a linear rgb color to greyscale transformation (the one used by MATLAB) is $s = T(r, g, b) = 0.2989 * r + 0.5870 * g + 0.1140 * b$. However, as long as you keep the function in this form (and just change the coefficients to constant values), your transformation will remain linear; this does not guarantee that the transformation will produce good results, though. 

EDIT: What I described is only a subset of linear transformations. A linear transformation is any function $T(r)$ where $T(A * r1 + B * r2) = A * T(r1) + B * T(r2)$