How do I output a line as a function of $x$? This might be really dumb, but I want to know how I can output a line after inputting an $x$ value. For example, how would I write a function that would give me the tangent line of a graph at a certain $x$ value?
 A: First of all - it is not "really dumb". You are exploring and thinking and that’s great!
I'll work through the tangent line example since you explicitly mentioned that in your question.
Given a differentiable function $f(x)$ we can construct the general tangent line at a point $a$, we will call this $T_{a}(x)$. We know that $T_a = mx+b$ (since it is a line). It is common knowledge that the derivative at a point gives the slope of the tangent line at that point, so now we have $T_a(x) = f'(x)x + b$. We also want the tangent line to go through the point $(a,f(a))$. The most concise way to do this is to apply the horizontal shift $(x-a)$ and then set $b$ to $f(a)$ yielding $$T_a(x) = f'(x)(x-a) + f(a).$$
The first time I worked through this myself when I was younger and exploring just like you, I didn't think of the horizontal shift, and instead I solved $$f'(a)a + b = f(a)$$ which yields $$b = f(a) - f'(a)a$$ yielding $$T_a(x) = f'(a)x +f(a)-f'(a)a$$ which is also a valid expression for the tangent line.
For specific function $f$, you can plot the function and the tangent line in desmos to see them visually. By adding a slide for the value $a$ you can toggle $a$ around and see the tangent line move! Here is a screen shot of a demonstration using the function $f(x) = x^x$ which is differentiable for $x > 0$.

