This is a function because each input x corresponds to exactly one output y. However, this is a linear function because the relationship between x and y is given by a straight line.
is it linear or non linear
Apologies for the confusion in my previous response. This is a linear function because the relationship between the input x and the output y is given by a straight line.