No, the relation x = 1 is not a linear function although its graph in an x-y-coordinate plane is a straight line.
Define the relation R as the set of all (x, y) ordered pairs in the Euclidean plane such that x = 1. Note that the definition of a function requires that if the ordered pair (a, b) is in R and the ordered pair (a, c) is in R, then b must be identical with c. However, for us, we see that (1, 3) is in R and (1, 5) is in R, but 3 is not equal to 5. Thus, R cannot be a function. Because R is not a function and all linear functions are functions, R is not a linear function.
Another way to see this is to use the vertical line test.