2
$\begingroup$

I have a straight line $y=f(x)$, i.e. $$ y=kx+m $$ $k, m$ are constants. $x$ is a variable. But is it correct to write $$ k,m\in\mathbb R $$ and $$ x\in \mathbb R \qquad? $$

Is this notation correct for both constants and variables? Or does the notation differ between constants and variables?

$\endgroup$
1
$\begingroup$

You need to indicate which are fixed and which are not. So, it is correct to write $k,m,x\in\mathbb{R}$, but $k$ and $m$ are fixed while $x$ is not.

Alternatively (and more commonly), you would write $f:\mathbb{R}\rightarrow\mathbb{R}$ and $f(x)=kx+m$. Here, you are indicating that $x$ is the variable because of the $x$ appearing in $f(x)$ and you are indicating that $x$ is coming from $\mathbb{R}$ by $f:\mathbb{R}$.

In this second way, you are making a distinction between the function $f$ and the formula for $f(x)$. $f$ is a function whose input is in $\mathbb{R}$ and whose output is also in $\mathbb{R}$. Whereas $f(x)=kx+m$ gives the formula for calculating the values of $f$.

$\endgroup$
1
$\begingroup$

Your notation says true things, but maybe what you want is to emphasize that the $x$ can vary, like in the notation \begin{align*} f:\mathbb R&\to\mathbb R\\ x&\mapsto f(x)=xk+m,& k,m\in\mathbb R. \end{align*}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.