We compute the random coding error exponent for linear multihop amplify-and-forward (AF) relay channels. Instead of considering only the achievable rate or the error probability as a performance measure separately, the error exponent results can give us insight into the fundamental tradeoff between the information rate and communication reliability in these channels. This measure enables us to determine what codeword length that is required to achieve a given level of communication reliability at a rate below the channel capacity. We first derive a general formula for the random coding exponent of general multihop AF relay channels. Then we present a closed-form expression of a tight upper bound on the random coding error exponent for the case of Rayleigh fading. From the exponent expression, the capacity of these channels is also deduced. The effect of the number of hops on the performance of linear multihop AF relay channels from the error exponent point of view is studied. As an application of the random coding error exponent analysis, we then find the optimal number of hops which maximizes the communication reliability (i.e., the random coding error exponent) for a given data rate. Numerical results verify our analysis, and show the tightness of the proposed bound.