0% found this document useful (0 votes)
6 views4 pages

Excel Matrix Operations Guide

The document outlines procedures for performing basic matrix operations using Excel, including addition, multiplication, transposition, and finding the inverse of matrices. It also explains how to solve systems of linear equations represented in matrix form. Each operation is accompanied by step-by-step instructions and examples for clarity.

Uploaded by

hosamani2266
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Excel Matrix Operations Guide

The document outlines procedures for performing basic matrix operations using Excel, including addition, multiplication, transposition, and finding the inverse of matrices. It also explains how to solve systems of linear equations represented in matrix form. Each operation is accompanied by step-by-step instructions and examples for clarity.

Uploaded by

hosamani2266
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Experiment - 06

Matrix Operations Using Excel

Aim: To perform basic matrix operations such as addition of two matrices, scalar
multiplication, matrix multiplication, transpose, and inverse of a matrix.

1. Matrix addition

Matrix addition involves adding corresponding elements of two matrices to produce a new
matrix. If A and B are two matrices of the same dimensions (m×n), their sum C is obtained by
adding corresponding elements: Cij=Aij+Bij where Cij is the, (i,j)-th element of the resulting
matrix C, and Aij and Bij are the corresponding elements of matrices A and B respectively.

Procedure:

• Set up the matrices.


• Enter the elements of the first 3x3 matrix (Matrix A).
• Enter the elements of the second 3x3 matrix (Matrix B).
• Select the number of cells equal to the size of the resulting matrix (3 × 3).
• In the first selected cell, type, = (Select Matrix A) + (Select Matrix B).
• Press Ctrl+Shift+Enter to execute the matrix addition as an array formula.

2. Matrix multiplication

Matrix multiplication involves multiplying corresponding elements of rows of the first matrix
by corresponding elements of columns of the second matrix and summing the products. If A is
an m × n matrix and B is an n × p matrix, their product C is an m × p matrix defined as:
𝑛

𝐶𝑖𝑗 = ∑ 𝐴𝑖𝑘 × 𝐵𝑘𝑗


𝑘=1

Where, 𝐶𝑖𝑗 is the (𝑖 , 𝑗)-th element of the resulting matrix C, 𝐴𝑖𝑘 is the (𝑖 , 𝑘)-th element of matrix
A, 𝐵𝑘𝑗 is the (𝑘 , 𝑗)-th element of matrix B.

Procedure:

• Set up the matrices.


• Enter the elements of the first 3x2 matrix (Matrix A).
• Enter the elements of the second 2x3 matrix (Matrix B).
• Select the number of cells equal to the size of the resulting matrix (3 × 3).
• In the first selected cell, type, =MMULT (select Matrix A, select Matrix B).
• Press Ctrl+Shift+Enter.

For Scalar Multiplication:

• Select the number of cells equal to the size of the resulting matrix (3 × 3).
• In the first selected cell, type, =scalar value*(select the matrix).
• Press Ctrl+Shift+Enter.

3. Transposing matrices

The transpose of an 𝑚 × 𝑛 matrix 𝐴 is denoted by 𝐴𝑇 and is obtained by swapping the rows and
columns of 𝐴. The (𝑖 , 𝑗)-th element of the transpose matrix is equal to the (𝑗, 𝑖)-th element of
the original matrix.

Procedure:

• Set up the matrices.


• Enter the elements of the 3x2 matrix (Matrix A).
• In a cell, type, =TRANSPOSE (select Matrix A).
• Press Enter.

4. Matrix Inverse

Given a square matrix 𝐴, the inverse of 𝐴, denoted 𝐴−1, is another matrix such that when
multiplied by 𝐴, the result is the identity matrix 𝐼.

𝐴 × 𝐴−1 = 𝐴−1 × 𝐴 = 𝐼

Procedure:

• Set up the matrix A.


• Enter the elements of the 3x3 matrix (Matrix A).
• Calculate the determinant of matrix using the formula =MDETERM(Matrix A).
• Press Enter.
• Select a 3×3 range of cells where you want to display the inverse matrix.
• In the first cell of the selected range, enter the following formula: =MINVERSE(Matrix A)
• Press Enter.

Note:

• Ensure that the matrix entered is a square matrix (3×3) and that its determinant is non-
zero for the inverse to exist.
• If the determinant of the matrix is zero, Excel will return a #VALUE! error.
• If the matrix is not square (e.g., 3×2 or 2×3), Excel will return a #VALUE! error.

5. Solving system of linear equations

A system of linear equations can be represented using matrices. The coefficient matrix [A]
contains the coefficients of the variables, the variable matrix [X] contains the variables, and
the constant matrix [B] contains the constants. The system of equations can be written in matrix
form as: [A][X] = [B].
If [A] is an invertible matrix (i.e., its determinant is non-zero), then we can multiply both sides
of the equation by [A]-1 to obtain: [X] = [A]-1 [B]
Procedure:

• Write the system of linear equations in matrix form.


• Set up the coefficient matrix A.
• Set up the constant matrix B.
• Select a 3×3 range of cells and find the inverse of matrix A.
• Select a 3×1 range of cells to calculate the solution matrix X, by multiplying inverse
matrix with the constant matrix using the formula, =MMULT([A]-1, [B])
• The resulting values give the solution of the system.
Data:

1. Matrix addition:

3 5 7 3 5 7
A= 5 12 10 B= 7 8 9
7 8 9 4 6 7

2. Matrix Multiplication:

5 7
A= 6 8 B= 2 3 1
3 2 4 6 7

Scalar Multilication: 3A = ?
-2 4 -3
A= 3 -5 -2
9 7 6

3. Transposing matrices:
1 4
A= 2 5
3 6

4. Matrix Inverse:
3 2 3
A= 1 2 5
1 2 6

5. Solving system of linear equations:

You might also like