Skip to main content
Mathematics LibreTexts

2.1: The Product Rule

  • Page ID
    60098
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The product rule is a rule that applies when we there is more than one variable (i.e. thing that can change) involved in determining the final outcome.

    Example \(\PageIndex{1}\)

    Consider the example of buying coffee at a coffee shop that sells four varieties and three sizes. When you are choosing your coffee, you need to choose both variety and size. One way of figuring out how many choices you have in total, would be to make a table. You could label the columns with the sizes, and the rows with the varieties (or vice versa, it doesn’t matter). Each entry in your table will be a different combination of variety and size:

    Small Medium Large
    Latte Small Latte Medium Latte Large Latte
    Mocha Small Mocha Medium Mocha Large Mocha
    Espresso Small Espresso Medium Espresso Large Espresso
    Cappucino Small Cappucino Medium Cappucino Large Cappucino

    As you can see, a different combination of variety and size appears in each space of the table, and every possible combination of variety and size appears somewhere. Thus the total number of possible choices is the number of entries in this table. Although in a small example like this we could simply count all of the entries and see that there are twelve, it will be more useful to notice that elementary arithmetic tells us that the number of entries in the table will be the number of rows times the number of columns, which is four times three.

    In other words, to determine the total number of choices you have, we multiply the number of choices of variety (that is, the number of rows in our table) by the number of choices of size (that is, the number of columns in our table). This is an example of what we’ll call the product rule.

    We’re now ready to state the product rule in its full generality.

    Theorem \(\PageIndex{1}\): Product Rule

    Suppose that when you are determining the total number of outcomes, you can identify two different aspects that can vary. If there are \(n_1\) possible outcomes for the first aspect, and for each of those possible outcomes, there are \(n_2\) possible outcomes for the second aspect, then the total number of possible outcomes will be \(n_1n_2\).

    In the above example, we can think of the aspects that can change as being the variety of coffee, and the size. There are four outcomes (choices) for the first aspect, and three outcomes (choices) for the second aspect, so the total number of possible outcomes is \(4 \cdot 3 = 12\).

    Sometimes it seems clear that there are more than two aspects that are varying. If this happens, we can apply the product rule more than once to determine the answer, by first identifying two aspects (one of which may be “all the rest”), and then subdividing one or both of those aspects. An example of this is the problem posed earlier of buying a doughnut to go with your coffee.

    Example \(\PageIndex{2}\)

    Kyle wants to buy coffee and a doughnut. The local doughnut shop has five kinds of doughnuts for sale and sells four varieties of coffee in three sizes (as in Example 2.1.1). How many different orders could Kyle make?

    Solution

    A natural way to divide Kyle’s options into two aspects that can vary is to consider separately his choice of doughnut, and his choice of coffee. There are five choices for the kind of doughnut he orders, so \(n_1 = 5\). For choosing the coffee, we have already used the product rule in Example 2.1.1 to determine that the number of coffee options is \(n_2 = 12\).

    Thus the total number of different orders Kyle could make is \(n_1n_2 = 5 \cdot 12 = 60\).

    Let’s go through an example that more clearly involves repeated applications of the product rule.

    Example \(\PageIndex{3}\)

    Chlöe wants to manufacture children’s t-shirts. There are generally three sizes of t-shirts for children: small, medium, and large. She wants to offer the t-shirts in eight different colours (blue, yellow, pink, green, purple, orange, white, and black). The shirts can have an image on the front, and a slogan on the back. She has come up with three images, and five slogans.

    To stock her show room, Chlöe wants to produce a single sample of each kind of shirt that she will be offering for sale. The shirts cost her $4 each to produce. How much are the samples going to cost her (in total)?

    Solution

    To solve this problem, observe that to determine how many sample shirts Chlöe will produce, we can consider the size as one aspect, and the style (including colour, image, and slogan) as the other. There are \(n_1 = 3\) sizes. So the number of samples will be three times \(n_2\), where \(n_2\) is the number of possible styles.

    We now break \(n_2\) down further: to determine how many possible styles are available, you can divide this into two aspects: the colour, and the decoration (image and slogan). There are \(n_{2,1} = 8\) colours. So the number of styles will be eight times \(n_{2,2}\), where \(n_{2,2}\) is the number of possible decorations (combinations of image and slogan) that are available.

    We can break \(n_{2,2}\) down further: to determine how many possible decorations are available, you divide this into the two aspects of image and slogan. There are \(n_{2,2,1} = 3\) possible images, and \(n_{2,2,2} = 5\) possible slogans, so the product rule tells us that there are \(n_{2,2} = 3 \cdot 5 = 15\) possible combinations of image and slogan (decorations).

    Putting all of this together, we see that Chlöe will have to create \(3(8(3 \cdot 5)) = 360\) sample t-shirts. As each one costs $4, her total cost will be $1440.

    Notice that finding exactly two aspects that vary can be quite artificial. Example 2.1.3 serves as a good demonstration for a generalisation of the product rule as we stated it above. In that example, it would have been more natural to have considered from the start that there were four apparent aspects to the t-shirts that can vary: size, colour, image, and slogan. The total number of t-shirts she needed to produce was the product of the number of possible outcomes of each of these aspects: \(3 \cdot 8 \cdot 3 \cdot 5 = 360\).

    Theorem \(\PageIndex{2}\): Product Rule For Many Aspects

    Suppose that when you are determining the total number of outcomes, you can identify \(k\) different aspects that can vary. If for each \(i\) between \(1\) and \(k\) there are \(n_i\) possible outcomes for the \(i^{\text{th}}\) aspect, then the total number of possible outcomes will be \(\prod_{i=1}^{k} n_i\) (that is, the product as \(i\) goes from \(1\) to \(k\) of the \(n_i\)).

    Now let’s look at an example where we are trying to evaluate a probability. Since this course is about counting rather than probability, we’ll restrict our attention to examples where all outcomes are equally likely. Under this assumption, in order to determine a probability, we can count the number of outcomes that have the property we’re looking for, and divide by the total number of outcomes.

    Example \(\PageIndex{4}\)

    Peter and Mary have two daughters. What is the probability that their next two children will also be girls?

    Solution

    To answer this, we consider each child as a different aspect. There are two possible sexes for their third child: boy or girl. For each of these, there are two possible choices for their fourth child: boy or girl. So in total, the product rule tells us that there are \(2 \cdot 2 = 4\) possible combinations for the sexes of their third and fourth children. This will be the denominator of the probability.

    To determine the numerator (that is, the number of ways in which both children can be girls), we again consider each child as a different aspect. There is only one possible way for the third child to be a girl, and then there is only one possible way for the fourth child to be a girl. So in total, only one of the four possible combinations of sexes involves both children being girls.

    The probability that their next two children will also be girls is \(\dfrac{1}{4}\).

    Notice that in this example, the fact that Peter and Mary’s first two children were girls was irrelevant to our calculations, because it was already a known outcome, over and done with, so is true no matter what may happen with their later children. If Peter and Mary hadn’t yet had any children and we asked for the probability that their first four children will all be girls, then our calculations would have to include both possible options for the sex of each of their first two children. In this case, the final probability would be \(\dfrac{1}{16}\) (there are 16 possible combinations for the sexes of four children, only one of which involves all four being female).

    Exercise \(\PageIndex{1}\)

    Use only the product rule to answer the following questions:

    1. The car Jack wants to buy comes in four colours; with or without air conditioning; with five different options for stereo systems; and a choice of none, two, or four floor mats. If the dealership he visits has three cars in the lot, each with different options, what is the probability that one of the cars they have in stock has exactly the options he wants?
    2. Candyce is writing a “Choose your own adventure” book in which she wants every possible choice to result in a different ending. If there are four points at which choices must be made in every storyline, and there are three choices the first time but two every time after that, how many endings does Candyce need to write?
    3. William is buying five books. For each book he has a choice of version: hardcover, paperback, or electronic. In how many different ways can he make his selection?

    This page titled 2.1: The Product Rule is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Joy Morris.

    • Was this article helpful?