Can a linear equation represent a function if the straight line does not cross any lines of the graph?

not sure what you mean by "any lines of the graph", are you talking about the x or y axes ?

if a line is horizontal, then it must cross the y-axis
and all horizontal lines are functions

if a line is vertical, then it must cross the x-axis, it is NOT a function

any other straight line must cross both the x and the y axes, and it would be a function