EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Excel Excel Resources Maths Function in Excel Matrix in Excel
 

Matrix in Excel

Udiksha Sable
Article byUdiksha Sable
Madhuri Thakur
Reviewed byMadhuri Thakur

Matrix in Excel

Table of Contents
  • What is a Matrix In Excel?
  • How to Create a Matrix in Excel?
  • Calculations on Matrix in Excel
    • Addition
    • Subtraction
    • Multiplication Using MMULT
  • Transpose of Matrix in Excel
  • How to Inverse a Matrix in Excel?
  • Find the Determinant of Matrix in Excel

What is a Matrix in Excel?

A Matrix is an arrangement of data (numbers or equations) in rows and columns that looks like a rectangular or square. It is an important data visualization tool in mathematics that helps solve mathematical linear equations.

  • It is represented by mxn (m multiplied by n), where m is the number of rows and n is the number of columns.
  • The most common matrix is the 3×3 matrix, which has 3 rows (m) and 3 columns (n).
  • Each data added to a matrix is called an element of the matrix.
  • When you multiply the m and n, i.e., the rows and columns of a matrix, you get the total number of elements present in a matrix.

Creating a matrix in Excel can help mathematicians, students, and other professionals easily perform complex matrix calculations using Excel formulas and functions.

 

 

Here’s an example of a 3×3 matrix with 9 elements:

Matrix in Excel

How to Create a Matrix in Excel?

Follow these steps to create a matrix in Excel:

  1. Create a table with the number of rows and columns you want in the matrix. E.g., 3×3.
  2. Fill the data in the cells.
  3. Add a name (heading) to the matrix. Every matrix should have a unique name. For instance, we have named the below matrix: Matrix A.

Naming 1

Calculation on Matrix in Excel

You can download this Matrix In Excel Template here – Matrix In Excel Template

Let us see how we can perform calculations like addition, subtraction, and multiplication on matrices in Excel.

1. Addition

Adding two matrices is similar to adding numbers in two rows or columns.

Steps:

⇒ First, make sure that both matrices have the same number of rows and columns.
⇒ Create a new third matrix that has the same number of rows and columns as the matrices you want to add.
⇒ In the first element of the new matrix, add the first elements of the two matrices together.
⇒ Drag the formula to other elements of the matrix.

Example:
Suppose we have two matrices: A & B. Here, we add the formula =A3+A8 in the 1st element of the third matrix. It adds both 1st elements of matrix A & B.

Example 1.2

Now, drag the formula till columns E and G to apply the formula to all elements of the third matrix. Now, you can see the addition of these cells shown in the new matrix.

Example 1.3

2. Subtraction

Similar to addition, subtracting two matrices is like subtracting numbers present in two columns.

Steps:

⇒ Ensure that the number of rows and columns in both matrices is the same, and create a new matrix with the same number of rows and columns.
⇒ In the first element of the third matrix, subtract the first element of the second matrix from the first element of the first matrix.

Example:
Let’s say you have two matrices: A & B. Here, first, we use the formula =A3-A8 in the 1st element of the third matrix. It subtracts both 1st elements of matrix A & B.

Example 2.1

Similarly, subtract the formulas for all elements, and you can see the subtracted values in the third matrix.

Example 2.2

3. Multiplication

Multiplication of matrices is not as simple as addition and subtraction. However, Excel makes it easier to multiply two matrices using the MMULT() function. So, let us see how to multiply the matrix in Excel.

Example:
Let’s take two different 3X3 matrices: Matrix G and Matrix J.

Example 3.1

Step 1: Create a new matrix with the same number of rows and columns.
Step 2: Select the range of the new matrix, e.g., I3: K5.

Example 3.2

Step 3: Type the formula =MMULT(A3:C5,E3:G5) where A3:C5,E3:G5 is the range of your first and second matrices.
Step 4: Press Ctrl+Shift+Enter.

Example 3.3

Result:
The third matrix shows the multiplication of Matrix G and J elements.

Example 3.4

Transpose of Matrix in Excel

Transpose of a matrix involves flipping a matrix where the resulting matrix has the same elements, but they are reorganized differently. It means the row elements become column elements, and the column elements become row elements. If you have a matrix I, the transpose of I is usually denoted as I^T.

Note: If the matrix has the same number of rows and columns, the elements present in the diagonal will stay the same.

Example:
Let’s say you have a matrix I with dimensions 2 x 3, which means it has 2 rows and 3 columns.

Transpose of Matrix in Excel

Steps:

  • Create a new matrix with nxm dimensions. It means the number of rows becomes the number of columns, and vice versa.
  • Select the range of the new matrix, e.g., E3: F5.
  • Type the formula =TRANSPOSE(A3:C4), where A3:C4 is the range of Matrix I.
  • Press Ctrl+Shift+Enter.

Result:

Transpose

How to Inverse a Matrix in Excel?

An inverse matrix is also known as a multiplicative inverse or reciprocal matrix. It is a matrix that you get when you multiply a matrix with an identity matrix. In Excel, you can easily find the inverse of a matrix by using the MINVERSE() function.

Example:
Suppose you have a 3×3 matrix E.

How to Inverse a Matrix

Steps:

⇒Select the range (Eg., E3:G5) where you want the inverse matrix to appear.
⇒Enter the following formula as an array formula: =MINVERSE(A3:C5), where A3:C5 is the range of matrix E.
⇒Press Ctrl+Shift+Enter.

Result:

You will have an inverse of matrix E.

How to Inverse a Matrix

Note:

  1. The matrix must be square, with the same number of rows and columns.
  2. If there are empty cells in the matrix, MINVERSE won’t work, showing an error (#VALUE!).
  3. If the matrix doesn’t meet the square rule (equal rows and columns), it will show an error (#VALUE!).
  4. Sometimes, some matrices can’t be inverted; hence, MINVERSE will show an error (#NUM!).

Determinant of Square Matrix in Excel

The determinant of a square matrix is a single number that tells us about the scaling property of the matrix. To find the determinant of a matrix in Excel, you can use the MDETERM() function. This method is suitable for relatively small matrices and provides a straightforward way to find the determinant in Excel.

Example:
Imagine we have the below matrix F.

Determinant of Square Matrix

Solution:
In an empty cell where you want to display the determinant, input this formula: =MDETERM(A3:C5), where A3:C5 is the range of the Matrix F.

Result:
The determinant of Matrix F is -1.

Determinant of Square Matrix 2

Note:

  1. The matrix must be square, meaning it has the same number of rows and columns. Thus, if the matrix doesn’t meet the square rule (equal rows and columns), it will also show an error (#VALUE!).
  2. If there are empty cells or text in the matrix, MDETERM won’t work, and it will show an error (#VALUE!).

Recommended Articles

This article guides you on how to create a Matrix in Excel. You may also look at these useful functions in Excel,

  1. Excel Correlation Matrix
  2. MMULT in Excel
  3. MINVERSE in Excel
  4. Inverse Matrix in Excel

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Matrix In Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download Matrix In Excel Template

EDUCBA

डाउनलोड Matrix In Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW