The Wayback Machine - https://web.archive.org/web/20241003043024/https://www.geeksforgeeks.org/factorial/
Open In App

Factorial in Maths | Formula and Examples

Last Updated : 24 Sep, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Factorial function is a fundamental concept in mathematics as factorials play important roles in various mathematical formulas such as permutations, combinations, probability, and many other formulas. The factorial of any natural number “n” is defined as the product of all natural numbers till n.

In this article, we’ll explore factorials, their notation, and the diverse range of formulas and techniques for computing factorials.

What-is-Factorial

Factorial Definition

A Factorial function is a mathematical function that multiplies a positive integer by all the positive integers less than it. It is denoted by an exclamation mark (!). The factorial of a non-negative integer n is defined as:

n! = [Tex] n \times (n-1) \times (n-2) \times \cdots \times 1[/Tex]

Factorial is the product of n numbers until it reaches up to 1. If we want to calculate the factorial of n, then we multiply the number less than or equal to n until it encounters 1.

n! = n ⨯ (n-1)!

Factorial Notation

The notation of the factorial function is “!” or “⌋”. If we have to find the factorial of the number n then, it is written as n! or n⌋.

Let’s consider some examples:

  • 5! = 5 × 4 × 3 × 2 × 1 = 120
  • 4! = 4 × 3 × 2 × 1 = 24
  • 3! = 3 × 2 × 1 = 6
  • 2! = 2 × 1 = 2
  • 1! = 1

Factorial of 0

As a factorial is defined as the product of natural numbers up to the number under consideration, but in the case of 0, if we were to follow the same definition, it would result in 0. However, this would lead to inconsistencies with many already proven results. Therefore, It is initially defined in such a way that the factorial of 0 is 1. This definition makes sense on a larger scale, and we have further demonstrated its validity. As we generalize factorials into gamma functions, the result remains the same.

Thus, the factorial of 0 is defined as 1 and is represented as 0!

factorial

Factorial Function

Factorial Formula

In the factorial function formula we multiply all the number less than n until it is equal to 1.

The factorial formula is given by:

n! = n × (n -1) × (n – 2) … 3 × 2 × 1

OR

n! = [Tex]\Pi_{i=1}^n  [/Tex]i

OR

n! = n× (n – 1)!

How to Find Factorial of a Number?

To find the factorial of a number we apply following steps:

  • First, check if the given number whose factorial is to be evaluated is positive or negative.
  • If the number is negative the factorial of negative number is undefined.
  • If the number is positive, find the factorial of the number using the above factorial formulas.

Factorial Examples

As we can calculate the factorials for any non-negative numbers, thus there can be infinitely many examples of factorials. Let’s consider some of those examples as follows:

Factorial of 5

The Factorial of 5 is obtained by multiplying numbers from 1 to 5.

Factorial of 5 = 5! = 5 × 4 × 3 × 2 × 1 = 120

Factorial of 10

The Factorial of 10 is obtained by multiplying numbers from 1 to 10.

Factorial of 10 = 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3628800

Factorial of 100

The Factorial of 100 is obtained by multiplying numbers from 1 to 100.

Factorial of 100 = 100! = 100 × 99 × 98 × 97 × 96 × . . . × 5 × 4 × 3 × 2 × 1 = 9.33262154 × 10157

Properties of Factorial Function

Some of the properties of factorial are:

  • For any non-negative integer n, 
    • n! = n × (n – 1) × (n – 2) × … × 3 × 2 × 1
  • Factorial can be defined recursively as follows:
    • n! = n(n – 1)! [ Where  0! = 1]
  • 0! is defined to be 1 by convention.
  • For any non-negative integer n, n! is always an integer.
  • As ∏ is used to represent product of terms in sequence, thus factorial of n can also be represented as:
    • n! = ∏(i = 1 to n) i.
  • Factorial of negative numbers are undefined.
  • The factorial of large numbers can grow very rapidly. For example, 10! = 3,628,800, 15! = 1,307,674,368,000, and so on. 

Factorials 1 to 20

The following table list of first 20 factorials, from 1 to 20.

Number

Factorial

1

1

2

2

3

6

4

24

5

120

6

720

7

5040

8

40320

9

362880

10

3628800

11

39916800

12

479001600

13

6227020800

14

87178291200

15

1307674368000

16

20922789888000

17

355687428096000

18

6402373705728000

19

121645100408832000

20

2432902008176640000

Applications of Factorial

There are various applications of the factorial. Some of the applications of factorials are listed below:

  • Factorial is used in permutations.
  • Factorials are used in combinations.
  • It is used in probability formulas.
  • It is used in binomial expansion.

Factorials function in Combinatorics

In calculation of both permutation and combination is used as the formula for both involves the factorials. Let’s see Permutation Formula and Combination Formula along with their examples.

Permutation Formula

The formula for calculating Permutation, denoted as nPr  which represents the number of ways to arrange r objects from a set of n distinct objects without repetition and formula for permutation is given by:

nPr = n! / (n – r)!

Where,

  • n is the total number of distinct objects to choose from,
  • r is the number of objects to be chosen and arranged,
  • n! is the product of all positive integers from 1 to n,
  • (n – r)! is the product of all positive integers from 1 to (n – r).

Example: Evaluate the value of 5P3.

Solution:

By permutation formula

nPr = n! / (n – r)!

⇒ 5P3 = 5! / (5 – 3)!

⇒ 5P3 = 5! / 2!

⇒ 5P3 = 120 / 2

⇒ 5P3 = 60

Combination Formula

The formula for calculating Combination, denoted as nCr, where n is the total number of items to choose from, and r is the number of items to choose without replacement. This formula is given as follows:

nCr = n! / [r! × (n – r)!]

Where,

  • n is the total number of distinct objects to choose from,
  • r is the number of objects to be chosen and arranged,
  • n! is the product of all positive integers from 1 to n,
  • (n – r)! is the product of all positive integers from 1 to (n – r).

Let us take an example for this:

Example: Find the value of 4C2.

Solution:

By combination formula

nCr = n! / [r! × (n – r)!]

⇒ 4C2 = 4! / [2! × (4 – 2)!]

⇒ 4C2 = 4! / [2! × 2!]

⇒ 4C2 = 24 / [2 × 2]

⇒ 4C2 = 24 / 4

⇒ 4C2 = 12

Factorial in Probability

Factorials are used in multiple formulas in probability, as factorials help us calculate the number of ways of things with the help of principle of counting, permutation, and combination. Let’s consider an example of Probability where we calculate the probability of any event with the help of factorials.

Example: A box contains different colored balls. There is 15% chance of getting a red ball. What is the probability that exactly 4 balls are red out of 10.

Solution:

Applying binomial distribution

P(X = r) = nCr pr qn-r

n = 10, p = 0.15, q = 0.85, r = 4

⇒ P(X = 4) = 10C4 (0.15)4 (0.85)6

⇒ P(X = 4) = [10! / {4! × 6!}] (0.15)4 (0.85)6

⇒ P(X =4) = [{10× 9 × 8 × 7} / 24] (0.15)4 (0.85)6

⇒ P(X = 4) = 0.04

Also, Check

Solved Examples on Factorial Function

Example 1: Evaluate the following.

  • Factorial of 1
  • Factorial of 3
  • Factorial of 4
  • Factorial of 6
  • Factorial of 7
  • Factorial of 8
  • Factorial of 9

Solution:

Factorial of 1 = 1! = 1

Factorial of 3 = 3! = 3 × 2 × 1 = 6

Factorial of 4 = 4! = 4 × 3 × 2 × 1 = 24

Factorial of 6 = 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720

Factorial of 7 = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040

Factorial of 8 = 8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40320

Factorial of 9 = 9! = 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 =362880

Example 2: What is the value of factorial: 14! / (11! × 4!)

Solution:

14! / (11! × 4!) = (14 × 13 × 12 × 11!) / (11! × 4!)

⇒ 14! / (11! × 4!) = (14 × 13 × 12) / 4!

⇒ 14! / (11! × 4!) = (14 × 13 × 12) / (4 × 3 × 2 × 1!)

⇒ 14! / (11! × 4!) = (14 × 13 × 12) / (12 × 2 )

⇒ 14! / (11! × 4!) = (7 × 13)

⇒ 14! / (11! × 4!) = 91

Example 3: Evaluate the expression 6! – 3!

Solution:

6! – 3! = (6 × 5 × 4 × 3!) – 3!

⇒ 6! – 3! = (6 × 5 × 4 × 3!) – 3!

⇒ 6! – 3! = (120 × 3!) – 3!

⇒ 6! – 3! = 3![120 – 1]

⇒ 6! – 3! = 6 × 119

⇒ 6! – 3! = 714

Example 4: If (1 / 6!) = (x / 8!) – (1 / 7!), then find the value of x.

Solution:

(1 / 6!) = (x / 8!) – (1 / 7!)

⇒ (1 / 6!) = (x / 8 × 7!) – (1 / 7!)

⇒ (1 / 6!) = (1 / 7!)[(x / 8) – 1]

⇒ (1 / 6!) = {1 / (7 ×6!)}[(x / 8) – 1]

⇒ (1 / 6!) = (1 / 6!)(1 / 7 )[(x / 8) – 1]

⇒ 1 = (1 / 7 )[(x / 8) – 1]

⇒ 7 = (x / 8) – 1

⇒ (x / 8) = 7 + 1

⇒ (x / 8) = 8

⇒ x = 64

Example 5: How many 4-digit numbers can be formed using the digits 4,6,7,9 in each of which no digit is repeated?

Solution:

Given:

Digits: 4, 6, 7, and 9

Number of digits = 4

We have to arrange these digits to form a 4-digit number.

The number of ways for arranging these digits to form a 4-digit number is 4!

and 4! = 4 × 3 × 2 × 1 = 24

Thus, there are 24 ways in which a 4 digit number can be formed without repeating the digits.

Example 6: Evaluate the expression 3! (2! × 0!)

Solution:

3! (2! × 0!) = (3 × 2 × 1) (2 × 1 × 1) [By using factorial formula and 0! = 1]

⇒ 3! (2! × 0!) = 6 × 2

⇒ 3! (2! × 0!) = 12

Practice Questions on Factorial

Problem 1: Evaluate.

  • (8! × 7!) / 6!
  • 7! / 4!
  • 10! – 9!

Problem 2: Simplify.

  • (7 + 3)! / 2!
  • 6! / (4! × 2!)
  • (9!) / [(7!) × (2!)]
  • (6!) / [(5!) × (3!)]
  • (12!) / [(11!) × (10!)]

Problem 3: Find the Value of n if

  • n! = 120
  • (n – 1)! = 24
  • (n + 2)! = 720
  • (n – 2)! = 120

Problem 4: Find the factorial of 9 and subtract the factorial of 6.

Conclusion

The factorial function is a fundamental concept in mathematics with wide-ranging applications in permutation and combination, probability, and algebra. By multiplying a positive integer by all positive integers below it, factorials help us solve problems related to permutations and combinations, providing essential tools for analyzing and organizing data. Understanding factorials not only aids in mathematical computations but also enhances problem-solving skills in various fields.

Factorial in Maths – FAQs

What is Factorial in Math?

Factorial of a number is the product of numbers less than n up to 1.

What is the Formula for the Factorial of any Number n?

The formula for the factorial is given by:

n! = n × (n -1) × (n – 2) … 3 × 2 × 1

How is a Factorial Calculated?

To calculate factorial of any number n i.e., n!, multiply all integers from 1 to n together. For example, 3! = 3 × 2 × 1 = 6.

What is the Value of 0!?

The value of factorial zero i.e., 0! = 1.

What is the Notation of Factorial function?

The notation of factorial functionis !

Why Factorial function is Used?

The factorial function is used in permutations, combinations, binomial theorem, probability etc.

What is the Purpose of Factorial function?

The purpose of factorial function is to represent the product of all positive integers from 1 to a given number, commonly used in combinatorics and mathematical calculations.

Can Factorials be Calculated for Non-Integer Values?

Factorials are defined for non-negative integers only, while the gamma function, an extension of factorials, is defined for all non-integer values.

What is Factorial of 5?

Factorial of 5 is denoted by 5! or 5⌋ and is equal to 120.

What is the value of 6 Factorial?

The value of factorial is 6! = 720

What is Factorial of 7?

Factorial of 7 is denoted by 7! and is equal to 5040.

What is factorial of 100?

Factorial of 100 is 9.33262154 × 10157.

What is the value of 4 Factorial?

The value of 4 Factorial is 4! = 120



Previous Article
Next Article

Similar Reads

Second Order Derivatives: Rules , Formula and Examples (Class 12 Maths)
The Second Order Derivative is defined as the derivative of the first derivative of the given function. The first-order derivative at a given point gives us the information about the slope of the tangent at that point or the instantaneous rate of change of a function at that point. Second-Order Derivative gives us the idea of the shape of the graph
10 min read
Special Series in Maths - Sequences and Series | Class 11 Maths
Special Series: A series can be defined as the sum of all the numbers of the given sequence. The sequences are finite as well as infinite. In the same way, the series can also be finite or infinite. For example, consider a sequence as 1, 3, 5, 7, … Then the series of these terms will be 1 + 3 + 5 + 7 + ….. The series special in some way or the othe
10 min read
Difference Between Maths and Vedic Maths
Mathematics has been a fundamental part of human knowledge for centuries, evolving through various cultures and eras. In the modern world, we primarily rely on what is known as Modern Mathematics—a structured and systematic approach to solving mathematical problems using algebra, geometry, calculus, and more. However, another fascinating system, Ve
6 min read
Division in Maths - Definition, Formula, Steps, Divisibility, Examples
Division in maths is a way of sharing or grouping numbers into equal parts. It helps us understand how many times one number can fit into another. It is a mathematical operation that involves splitting something into equal parts. It is also one of the four basic arithmetic operations, along with addition, subtraction, and multiplication. Division i
13 min read
Factorial Formula
Factorial of a number 'n' is defined as the product of all the whole numbers less than 'n' up to 1. So, it can be defined as a factorial for a number 4 as 4 × 3 × 2 × 1 = 24. It is represented by the symbol '!'. Suppose, the factorial of 5 needs to be written, it can be written as 5! and the value of 5! is 5 × 4 × 3 × 2 × 1 = 120. Let's take a look
6 min read
Rydberg Formula: Formula, Proof and Solved Examples
The Rydberg formula predicts the wavelength of light produced by an electron moving between atomic energy levels. Each element has a unique spectral fingerprint. When an element's gaseous state is heated, light is produced. When this light passes through a prism or a diffraction grating, bright lines of various hues can be discerned. In some manner
6 min read
Molecular Weight Formula - Definition, Formula, Solved Examples
An atom is the basic building block of matter i.e. everything around us is made of matter. This is the smallest unit into which matter can be divided without the release of any electrically charged particles. This is the smallest unit of matter which has the characteristic properties of a chemical element. The mass of an atom depends on the electro
5 min read
NCERT Solutions for Class 9 Maths Chapter 12 Heron’s Formula
This article provides you with detailed NCERT Solutions for Class 9 Maths Chapter 12-Heron's Formula. They have been solved by a team of experienced professionals at GFG, to make sure that every student can learn how to solve these questions with the easiest approach. This article provides solutions to all the problems asked in Class 9 Maths Chapte
15 min read
Distance Formula Class 10 Maths
The distance formula is one of the important concepts in coordinate geometry which is used widely. By using the distance formula we can find the shortest distance i.e drawing a straight line between points. There are two ways to find the distance between points: Pythagorean theoremDistance formulaTable of Content Pythagorean TheoremWhat is Distance
9 min read
Equation in Maths | Definition , Types, Uses and Examples
Equations in Maths are statements that equates two terms involving variables and constants. Equations are a form of statement that shows that the two expressions are equal. There are various types of equations - Linear, Quadratic, Polynomial, Logarithmic, Trigonometric as well as some other shape equations like equations of Line, Circle, Ellipse, P
15+ min read
Real-Life Examples of Rotation in Maths
Rotation in math's refers to a type of transformation where an object is moved in a circular motion around a center, axis, or fixed point. This transformation involves rotating each point in a figure by a certain number of degrees around a given point. The result of a rotation is a new figure called the image, which is congruent to the original fig
6 min read
Trapezium in Maths | Formulas, Properties & Examples
Trapezium in Maths: A Trapezium is a polygon with four sides, i.e. it is a quadrilateral. Trapezium originated from the Greek word "trapeze" which means table. It is a complex quadrilateral. A trapezium is a special quadrilateral with only one pair of parallel sides. A trapezium is a two-dimensional shape that appears as a table. A trapezium has fo
12 min read
Square in Maths - Area, Perimeter, Examples & Applications
Square is a type of quadrilateral with four sides. What distinguishes a square from other quadrilaterals is that all four sides of a square are of equal length, and all four interior angles are right angles (90 degrees). Let's learn about Square, including its properties, area, perimeter, examples, practice problems, and applications of Square in r
9 min read
BODMAS Rule in Maths | Examples, Full form, Practice Questions
BODMAS Rule: Understanding the Foundation of Order of Operations in MathematicsThe BODMAS rule is a fundamental mathematical principle that ensures accuracy when solving expressions with numerous operations. Applying the BODMAS rule allows us to approach complex mathematical problems in an ordered way, avoiding usual traps and ensuring the correct
11 min read
Pentagon in Maths | Shape, Examples & Types
Pentagon is a two-dimensional, closed geometric shape which has five straight sides and five angles. A Pentagon is one of various types of polygons, which constitute a family of two-dimensional geometric shapes formed by connecting straight lines to enclose a region. In this article, we will discuss Pentagon in detail, including its shape, parts, t
14 min read
Check whether factorial of N is divisible by sum of first N natural numbers
Given a number 'N'. Check whether factorial of 'N' is divisible by the sum of first 'N' natural numbers or not? If divisibility is possible, then print YES else print NO.Examples: Input: N = 3 Output: YES As (1*2*3)%(1+2+3) = 0, Hence divisibility is possible. Input: N = 4 Output: NO Here (1*2*3*4)%(1+2+3+4) != 0, Hence divisibility doesn't occur.
10 min read
Calculate MDAS Factorial of given number
Given an integer N, the task is to find the MDAS factorial.The general factorial of a no. N is given by: Factorial(N) = (N)*(N-1)*(N-2)*(N-3)*(N-4)*(N-5)*(N-6)*(N-7)- - - - - -(3)*(2)*(1). In MDAS factorial, instead of simply multiplying the numbers from N to 1, we perform four operations, Multiplication(*), Divide(/), Addition(+) and Subtraction(-
5 min read
What is the Value of 100 Factorial?
Answer: The approximate value of 100! is 9.3326215443944E+157The value of 100 factorial (100!) is a large number that can be calculated using mathematical software or calculators designed to handle such computations. Calculating it manually is highly impractical due to the number of multiplications involved. However, you can express the result appr
1 min read
What is a Factorial Notation?
Sometimes, to find order, arrangements, or combinations of objects are required. Combinatorics is that branch of mathematics that focuses on the study of counting. So the fundamental counting principle was introduced which states that if one event has m possible outcomes and the second event has n possible outcomes, then there are m × n outcomes fo
4 min read
Check if a given number is factorial of any number
Given a number n, the task is to determine whether n can be a factorial of some number x.Examples: Input: N = 24Output: YesExplanation: 4! = 24 Input: N = 25Output: No Approach: For a number to be a factorial of any number it must be divisible by all the numbers from 1 to that number. So in this approach We keep on dividing the number if it is comp
4 min read
Zero Factorial (0!)
The value of zero factorial is 1. Factorial of any number "n" is calculated by multiplying all the numbers between n and 1 (including n). So one might ask what is the value of zero factorial, the value of 0! factorial is 1 and this is calculated using various methods. In this article we are going to learn about the definition of factorial, how fact
7 min read
Derivative of a Factorial
Derivative of a factorial function can be explored through its connection to the Gamma function, which generalizes the concept of factorials to non-integer values. Since the factorial function is only defined for integers, we use the Gamma function, Γ(n) = (n − 1)!, to extend the notion of factorials to all complex numbers except negative integers.
4 min read
Area and Perimeter of Shapes | Formula and Examples
Area and Perimeter are the two fundamental properties related to 2-dimensional shapes. Defining the size and length of its boundary. By learning about the areas of 2D shapes, we can easily determine the surface areas of 3D bodies and perimeter helps us to calculate the length of the boundary of any 2D closed shape. The method and parameters require
11 min read
Prices Related to Buying and Selling (Profit and Loss) - Comparing Quantities | Class 8 Maths
A Person can gain profit only if Selling Price > Cost Price. Also, a person generates loss when Selling Price < Cost Price. So let's understand each term in detail. Selling Price (S.P) Definition: The price at which a shopkeeper sells an item to a customer is known as the Selling price(S.P). Formula: To calculate the selling price(S.P) when t
6 min read
Sales Tax, Value Added Tax, and Goods and Services Tax - Comparing Quantities | Class 8 Maths
Tax is a mandatory fee levied by the government to collect revenue for public works providing the best facilities and infrastructure. The first known Tax system was in Ancient Egypt around 3000–2800 BC, in First Dynasty of Egypt. The first form of taxation was corvée and tithe. In India, The Tax was first introduced in 1860 by Sir James Wilson. The
6 min read
Measures of Dispersion | Types, Formula and Examples
Measures of Dispersion are used to represent the scattering of data. These are the numbers that show the various aspects of the data spread across various parameters. Let's learn about the measure of dispersion in statistics , its types, formulas, and examples in detail. Dispersion in StatisticsDispersion in statistics is a way to describe how spre
10 min read
Molality |Definition, Formula and Examples
Molality is the term used to express the concentration of the solution. The concentration of a solution is defined as the measure of the quantity of one substance when it is mixed with another substance. Let's learn about Molality in detail, including its definition, SI unit formula, and solved examples. Definition of MolalityThe molality of a solu
7 min read
Normality - Definition, Formula, Equations and Solved Examples
The normality formula is used to measure the concentration of a solution like molarity and molality. Normality is a measure of the number of grams equivalent to solute present given volume of the solution. Redox reactions, precipitation reactions, and acid-base chemical reactions all often make use of normality. It depends on the temperature and th
7 min read
Volume of Cuboid | Formula and Examples
Volume of a cuboid is calculated using the formula V = L × B × H, where V represents the volume in cubic units, L stands for length, B for breadth, and H for height. Here, the breadth and width of a cuboid are the same things. The volume signifies the amount of space occupied by the cuboid in three dimensions. To measure it, multiply the length by
8 min read
Molarity - Definition, Formula and Solved Examples
Molarity is defined as total number of moles of solute per litre of solution. It is represented by M. In chemistry, the molarity is one of the concentration units. The concentration of solutions can be expressed more effectively using measurements based on moles. The SI unit of Molarity is Mole. A mole is an SI unit that measures the amount of a su
7 min read