If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Multiplying functions

Sal solves the following problem: given that f(x)=7x-5 and g(x)=x^3+4x, find (f*g)(x). He explains that generally, (f*g)(x)=f(x)*g(x). Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • orange juice squid orange style avatar for user Monika
    Could you simplify it further to: x(7x^3-5x^2+28x-20) ?
    (37 votes)
    Default Khan Academy avatar avatar for user
  • female robot ada style avatar for user Emma
    At Sal says that he doesn't like using FOIL. FOIL is really easy and is much less confusing then the way Sal did the distributive property twice even though you get the same answer. Why does Sal not like FOIL?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ArDeeJ
      FOIL won't help you if you have to expand a product that isn't two binomials multiplied together; for example, two trinomials multiplied together. It's usually better to understand what you're doing instead of relying on mnemonics.

      For example: (a + b + c) * (d + e + f)
      = ad + ae + af + bd + be + bf + cd + ce + cf
      (30 votes)
  • piceratops tree style avatar for user Diego Perez
    At why is it that 7x * x^3 equals to x^4 ?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Jamarcus Hull
    How do you find the product of this question? (x+1)(-5x+7)
    (0 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user Melenie Mattingly
    what do you mean by (fx) =7x -5 is this a formula
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Saleh Hussain
    In
    Why x^3 * 7x = 7x^4 !
    Why there's fourth power. I can't get it :(
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf red style avatar for user Petra
    What do you do if you're given a number? For example, you're given your two equations and it says: Find (f o g) (0)? Do you plug the zero into your equations or solve f*g then input the 0 into your output?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Chaya Zajac
    When we got the final function after solving the problem, Sal stated that we cannot simplify the expression because each variable was to a different degree. But, I thought one can subtract variables with exponents, so why can one not simplify the expression?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user Aimee
    is (f*g)(x) the same as (f o g)(x)?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leafers sapling style avatar for user M93A.cz
    Hi. I'm primary a programmer but I'm really interested in math and I think I found another possible interpretation of multiplying functions.
    The key is in the notation f^-1 which is defined as
    \forall functions f and x \in D(f) and y \in R(f):
    y=f(x) <=> x=(f^-1)(y)
    where D(f) is the domain and R(f) is the range of a function.

    It gives a clue that there could possibly be f^2 meaning f(f(x)).
    This would mean that (f \times g)(x) = f(g(x)).

    NOTE: In latex \times is a vector cross product. I use to distinguish it from the ordinary multiplication. The same as cross product, this type of multiplication is also not commutative.

    The \times operator treats similar to ordinary multiplication of real numbers:
    \forall x \in R-{0}: x * x^-1 = 1 where 1 is the neutral element of multiplication.
    \forall functions f: f \times f^-1 = n where n is the neutral function n(x)=x.

    Is this used somewhere in the mathematics?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ArDeeJ
      Yes, that's all correct. f^2(x) is commonly taken to mean f(f(x)), similarly with higher exponents. Negative exponents refer to the inverse function, that is, f^(-2)(x) = f^(-1)(f^(-1)(x)).

      What you called \times is called function composition, and is written (g ∘ f)(x) = g(f(x)). As you noted, it's not commutative, but it is associative. Whenever the compositions are defined, (h ∘ g) ∘ f = h ∘ (g ∘ f) = h ∘ g ∘ f.

      In a way, the function iteration can be extended to fractional exponents as well. For example, the function g(x) = f^(1/2)(x) would be a function that satisfies g^2(x) = f(x).

      Also, as a side note, the neutral function is more commonly called the identity function (and the neutral element 1 is called the identity element).

      (The trigonometric functions break this convention: sin^2(x) is taken to mean sin(x)*sin(x). However, sin^(-1)(x) = arcsin x still refers to the inverse function. Arcsin is preferred over sin^(-1).)
      (3 votes)

Video transcript

f of x is equal to 7x minus 5. g of x is equal to x to the third power plus 4x. And then they ask us to find f times g of x So the first thing to realize is that this notation f times g of x is just referring to a function that is a product of f of x and g of x. So by definition, this notation just means f of x times g of x. And then we just have to substitute f of x with this definition, g of x with this definition, and then multiply out these algebraic expressions. f of x is right over there. And g of x, is right over there. So let's do it. So this is going to be equal to-- switch back to the orange color. It's going to be equal to f of x, which is 7x minus 5 times g of x, and g of x is x to the third power plus 4x. And you could-- we're multiplying two expressions that each have two terms. You could use FOIL if you like. I don't like using FOIL because you might forget what it's even about. Foil is really just using the distributive property twice. So for example, you take this expression. Whatever you have out here, if you had a 9 out here, or an a, or an x, or anything. Now you have 7x minus 5. If you're multiplying it times this expression, you would multiply this times each term over here. So when you multiply 7x minus 5 times x to the third, you get-- I'll write it this way. You get x to the third times-- actually, let me write it the other way. You get 7x minus 5 times x to the third. And then you have plus 7x minus 5 times 4x. And now we can do the distributive property again. We're not normally used to seeing the things we distribute on the right hand side. It's the same exact idea. We could put the x to the third here as well. And when we distribute, you multiply x to the third times 7x and times negative 5. x to the third times 7x is 7x to the fourth power. X to the third times negative 5 is minus 5x to the third. And then you do it over here. You distribute the 4x over the 7x. 4x times 7x is plus 28x squared. 4x times negative 5 is minus 20x. And let's see if we can simplify this. We only have one fourth degree term, one third degree term, one second degree term, and one first degree term. Actually, we can't simplify this anymore. And we're done. This is the product of those two function definitions. This is f times g of x. It is a new function created by multiplying the other two functions.