0% found this document useful (0 votes)
3 views2 pages

DSA Lab 5 task

The lab focuses on implementing matrix multiplication using two-dimensional arrays, covering both standard and generalized multiplication. It emphasizes the importance of compatible matrix sizes and helps students understand data storage and index manipulation in 2D arrays. The hands-on experience enhances skills in working with multi-dimensional arrays and nested loops, which are crucial in various fields like graphics and machine learning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

DSA Lab 5 task

The lab focuses on implementing matrix multiplication using two-dimensional arrays, covering both standard and generalized multiplication. It emphasizes the importance of compatible matrix sizes and helps students understand data storage and index manipulation in 2D arrays. The hands-on experience enhances skills in working with multi-dimensional arrays and nested loops, which are crucial in various fields like graphics and machine learning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Structures and Algorithm

Name: Rana Muhammad Musab Akram Roll No : 23-CSE-24 Lab: 05

Lab Objective:
Implementation of the algorithm for matrix multiplication using two-dimensional arrays.

Abstract:
This lab focuses on implementing matrix multiplication using two-dimensional arrays. Matrix
multiplication is a fundamental operation in linear algebra with applications in graphics, data science,
machine learning, and scientific computing. The lab introduces both standard multiplication for square
matrices (n × n) and generalized multiplication where the number of columns in matrix A equals the
number of rows in matrix B (cA = rB). This task helps students understand data storage in 2D arrays
and how to manipulate indices to perform calculations over rows and columns.

Lab Tasks:

a) Implement the above algorithm in C++.

b) Considering A is of order rAxcA, and B is of order rBxcB, revise the above algorithm and
implement it in
C++. cA=rB, but rA, rB and cB can be different quantities.
Data Structures and Algorithm

Conclusion:
This lab helped us understand and implement the logic of matrix multiplication, starting from square
matrices and extending to general matrices of compatible sizes. We also explored the rule that the
number of columns in the first matrix must equal the number of rows in the second. These concepts
are foundational in areas such as computer graphics, scientific computation, and neural networks. The
hands-on practice enhanced our ability to work with multi-dimensional arrays and nested loops.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy