0
$\begingroup$

If I have $f(x,y)=2x+y^2$ and $g(x,y,z)=x+y+z$, is addition a valid operation?

I.e. $f(x,y)+g(x,y,z)=y^2+3x+y+z$?

$\endgroup$
  • 2
    $\begingroup$ Well, it's not clear what you mean by that. Is the left hand a function of three variables? You could certainly define $F(x,y,z)=f(x,y)$ and then add $F$ and $g$ (getting the formula your wrote). But it's not obvious that this is what you intend. $\endgroup$ – lulu Sep 3 '17 at 14:37
7
$\begingroup$

Technically, no. Your first is a function $f: \mathbb{R}^2 \to \mathbb{R}$ while your second is a map $g: \mathbb{R}^3 \to \mathbb{R}$. As their domains are different, you can't add them. You can of course cheat by defining $f: \mathbb{R}^3 \to \mathbb{R}$ as $f(x,y,z) = 2x+y^2$ and then add them. You should consider if that changes your analysis, though.

$\endgroup$
1
$\begingroup$

Function addition is defined as $(f+g)(\vec x):=f(\vec x)+g(\vec x)$. So $(f+g)$ is undefined if $f$ has domain $\Bbb R^2$ and $g$ has domain $\Bbb R^3$. So you can redefine $f$ from $f(x,y)=2x+y^2$ to $f(x,y,z)=2x+y^2$, then in that case you can add these functions.

$\endgroup$
  • 2
    $\begingroup$ The $:=$ should be the other way around, $f(x)+g(x)$ is already defined as it's just real number addition, $f+g$ is what needs to be defined. $\endgroup$ – YoTengoUnLCD Sep 3 '17 at 16:05
  • $\begingroup$ @YoTengoUnLCD good point. I was just trying to show that the two expressions are the same. $\endgroup$ – Dave Sep 3 '17 at 16:06
  • $\begingroup$ @YoTengoUnLCD Then wouldn't OP be correct then? $\endgroup$ – Andrew Tawfeek Sep 3 '17 at 17:00
  • $\begingroup$ @AndrewTawfeek nope. In my definition of $f+g$ it is assumed that $x$ is in the domain of both $f,g$, else, the expression $f(x)$ makes no sense. $\endgroup$ – YoTengoUnLCD Sep 3 '17 at 17:02
  • $\begingroup$ @AndrewTawfeek I see your confusion, but the function addition also relies on the domains being the same, which is not the case when $f$ is only over $\Bbb R^2$. $\endgroup$ – Dave Sep 3 '17 at 17:02
0
$\begingroup$

Adding together the values of two real-valued functions as you have done is certainly allowed.

If you want to define a new function that's the sum of the first two, then the domain, as noted by @Dave, must be the same, and the codomain must have a notion of addition (which $\Bbb R$ does, of course), so in this case, you cannot add functions (because of the first constraint)

$\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.