SlideShare a Scribd company logo
A matrix is a collection of numbers arranged into a fixed
number of rows and columns. A matrix is defined as an ordered
rectangular of numbers. They can be used to represent systems
of linear equations.
Matrix Dimensions: The numbers of rows and columns of a
matrix are called its dimensions. Here is a matrix with three
rows and two columns:
a2 a2
a3 a3
a9 a0
A =
3x2
In above example, Capital A is the Matrix name and small “a” is an element name and
value of those elements or matrix is subscript of “a”.
There are several types of matrices, but the most commonly
used are:
 Rows Matrix
 Columns Matrix
 Rectangular Matrix
 Square Matrix
 Diagonal Matrix
 Scalar Matrix
 Identity Matrix
 Triangular Matrix
 Null or Zero Matrix
 Transpose of a Matrix
 Rows Matrix
A matrix is said to be a row matrix if it has only one row.
A=[123]
 Columns Matrix
A matrix is said to be a column matrix if it has only one column.
B =
 Rectangular Matrix
A matrix is said to be rectangular if the number of rows is not
equal to the number of columns.
A=
1
2
3
1 2 8
5 6 9
 Square Matrix
A matrix is said to be square if the number of rows is equal to the
number of columns.
A=
 Diagonal Matrix
A square matrix is said to be diagonal if at least one element of
principal diagonal is non-zero and all the other elements are
zero.
A=
 Scalar Matrix
A diagonal matrix is said to be scalar if all of its diagonal elements
are the same.
A=
1 2 3
6 7 8
9 6 5
1 0 0
0 2 0
0 0 3
2 0 0
0 2 0
0 0 2
 Identity Matrix
A diagonal matrix is said to be identity if all of its diagonal
elements are equal to one, denoted by I.
 Triangular Matrix
A square matrix is said to be triangular if all of its elements
below the principal diagonal are zero (lower triangular matrix) or
all of its elements above the principal diagonal are zero (upper
triangular matrix).
(Lower Triangular Matrix) (Upper Triangular Matrix)
1 0 0
0 1 0
0 0 1
I =
A =
1 0 0
2 4 0
3 5 6
1 2 3
0 4 5
0 0 6
A =
 Null or Zero Matrix
A matrix is said to be a null or zero matrix if all of its elements
are equal to zero. It is denoted by O.
,
 Transpose of a Matrix
Suppose A is a given matrix, then the matrix obtained by
interchanging its rows into columns is called the transpose
of A. It is denoted by At
then
0 0 0
0 0 0
0 0 0
O =
0 0 0
0 0 0O =
1 2 3
8 4 6A =
1 8
2 4
3 6
At =
• Multiplication of a Matrix by a Scalar
A matrix can be multiplied by a scalar (by a real number) as
follows:
To multiply a matrix by a scalar, multiply each element of the
matrix by the scalar. Here is an example of this. (In this example,
the variable a is a scalar.)
1 2 3
8 4 6a =
1a 2a 3a
8a 4a 6a
• Matrix Addition
If two matrices have the same number of rows and same number
of columns, then the matrix sum can be computed: If A is an MxN
matrix, and B is also an MxN matrix, then their sum is an MxN
Matrix formed by adding corresponding elements of A and B
Here is an example of this:
1 2 3
8 4 6
+
1 2 3
8 4 6 =
2 4 6
16 8 12
The determinant is a value that can be computed
from the elements of a square matrix.
The determinant of a matrix A is denoted by det(A)
or |A|. It can be viewed as the scaling factor of
the transformation described by the matrix.
In the case of a 2 × 2 matrix the specific formula
for the determinant is:
A =
a b
c d = ad-bc
In the case of a 3 X 3 matrix the specific formula
for the determinant is:
A =
a b c
d e f
g h i
= a e f
h i
- b d f
g i
+ c d e
g h
= aei + bfg + cdh – ceg – bdi – afh.
For a square matrix A, the inverse is written A-1
When A is multiplied by A-1 the result is
the identity matrix I. Non-square matrices do not
have inverses.
Note: Not all square matrices have inverses. A
square matrix which has an inverse is
called invertible or nonsingular, and a square
matrix without an inverse is called noninvertible or
singular.
Here's a C program to enter values in a matrix and print values in a matrix using For
Loops and Nested Loops with output and explanation.
# include <stdio.h>
# include <conio.h>
void main()
{
int mat[10][10] ; int i, j, row, col ;
clrscr() ;
printf("Enter the order of the matrix : ") ;
scanf("%d %d", &row, &col) ;
printf("nEnter the elements of the matrix : nn");
for(i = 0 ; i < row ; i++)
for(j = 0 ; j < col ; j++)
scanf("%d", &mat[i][j]) ;
printf("nnThe elements in the matrix are: nn");
for(i = 0 ; i < row ; i++)
{
for(j = 0 ; j < col ; j++)
{
printf("%d", mat[i][j]) ;
printf("t"); } printf("n");
}
getch() ;
}
Output of above program -
Enter the order of the matrix : 3 3
Enter the elements of the matrix :
1
2
3
4
5
6
7
8
9
The elements in the matrix are:
1 2 3
4 5 6
7 8 9

More Related Content

What's hot

Matrices and System of Linear Equations ppt
Matrices and System of Linear Equations pptMatrices and System of Linear Equations ppt
Matrices and System of Linear Equations ppt
Drazzer_Dhruv
 
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES, INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
AMIR HASSAN
 
presentation on matrix
 presentation on matrix presentation on matrix
presentation on matrixNikhi Jain
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
Farzad Javidanrad
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matricesStudent
 
Determinants - Mathematics
Determinants - MathematicsDeterminants - Mathematics
Determinants - Mathematics
Drishti Bhalla
 
Matrices & determinants
Matrices & determinantsMatrices & determinants
Matrices & determinantsindu thakur
 
MATRICES
MATRICESMATRICES
MATRICESfaijmsk
 
Matrices
MatricesMatrices
Matrices
manjunathindira
 
Cramers rule
Cramers ruleCramers rule
Cramers rulemstf mstf
 
Theory of Equation
Theory of EquationTheory of Equation
Theory of Equation
SwathiSundari
 
Ppt on matrices and Determinants
Ppt on matrices and DeterminantsPpt on matrices and Determinants
Ppt on matrices and Determinants
NirmalaSolapur
 
Matrices & Determinants
Matrices & DeterminantsMatrices & Determinants
Matrices & Determinants
Birinder Singh Gulati
 
Matrices
Matrices Matrices
Matrices
Karan Kukreja
 
Matrices And Determinants
Matrices And DeterminantsMatrices And Determinants
Matrices And Determinants
DEVIKA S INDU
 
Matrix and Determinants
Matrix and DeterminantsMatrix and Determinants
Matrix and Determinants
AarjavPinara
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectorsAmit Singh
 
Inverse Matrix & Determinants
Inverse Matrix & DeterminantsInverse Matrix & Determinants
Inverse Matrix & Determinantsitutor
 
MATRICES
MATRICESMATRICES
Matrix basic operations
Matrix basic operationsMatrix basic operations
Matrix basic operationsJessica Garcia
 

What's hot (20)

Matrices and System of Linear Equations ppt
Matrices and System of Linear Equations pptMatrices and System of Linear Equations ppt
Matrices and System of Linear Equations ppt
 
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES, INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
 
presentation on matrix
 presentation on matrix presentation on matrix
presentation on matrix
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
 
Determinants - Mathematics
Determinants - MathematicsDeterminants - Mathematics
Determinants - Mathematics
 
Matrices & determinants
Matrices & determinantsMatrices & determinants
Matrices & determinants
 
MATRICES
MATRICESMATRICES
MATRICES
 
Matrices
MatricesMatrices
Matrices
 
Cramers rule
Cramers ruleCramers rule
Cramers rule
 
Theory of Equation
Theory of EquationTheory of Equation
Theory of Equation
 
Ppt on matrices and Determinants
Ppt on matrices and DeterminantsPpt on matrices and Determinants
Ppt on matrices and Determinants
 
Matrices & Determinants
Matrices & DeterminantsMatrices & Determinants
Matrices & Determinants
 
Matrices
Matrices Matrices
Matrices
 
Matrices And Determinants
Matrices And DeterminantsMatrices And Determinants
Matrices And Determinants
 
Matrix and Determinants
Matrix and DeterminantsMatrix and Determinants
Matrix and Determinants
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectors
 
Inverse Matrix & Determinants
Inverse Matrix & DeterminantsInverse Matrix & Determinants
Inverse Matrix & Determinants
 
MATRICES
MATRICESMATRICES
MATRICES
 
Matrix basic operations
Matrix basic operationsMatrix basic operations
Matrix basic operations
 

Similar to Matrix

Matrices
MatricesMatrices
Matrices
ashishtqm
 
Basic concepts. Systems of equations
Basic concepts. Systems of equationsBasic concepts. Systems of equations
Basic concepts. Systems of equationsjorgeduardooo
 
ppt of VCLA
ppt of VCLAppt of VCLA
ppt of VCLA
Nirali Akabari
 
Matrices and determinats
Matrices and determinatsMatrices and determinats
Matrices and determinatsdaferro
 
MATRICES
MATRICESMATRICES
MATRICESdaferro
 
Matrices
MatricesMatrices
Matricesdaferro
 
matrices and function ( matrix)
matrices and function ( matrix)matrices and function ( matrix)
matrices and function ( matrix)
রেজা তানজিল
 
Presentation On Matrices Mathematics DIU
Presentation On Matrices Mathematics DIUPresentation On Matrices Mathematics DIU
Presentation On Matrices Mathematics DIU
Shuvo Shuvo
 
Matrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMatrix and its applications by mohammad imran
Matrix and its applications by mohammad imran
Mohammad Imran
 
intruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptxintruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptx
ShaukatAliChaudhry1
 
Matrix_PPT.pptx
Matrix_PPT.pptxMatrix_PPT.pptx
Matrix_PPT.pptx
JiaJunWang17
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
JinTaek Seo
 
Matrix and Matrices
Matrix and MatricesMatrix and Matrices
Matrix and Matrices
esfriendsg
 
Matrices and Determinants
Matrices and DeterminantsMatrices and Determinants
Matrices and Determinants
SOMASUNDARAM T
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
AMANPATHAK87
 
Engg maths k notes(4)
Engg maths k notes(4)Engg maths k notes(4)
Engg maths k notes(4)
Ranjay Kumar
 
matrix algebra
matrix algebramatrix algebra
matrix algebra
kganu
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinants
som allul
 
Calculus and matrix algebra notes
Calculus and matrix algebra notesCalculus and matrix algebra notes
Calculus and matrix algebra notes
VICTOROGOT4
 

Similar to Matrix (20)

Matrices
MatricesMatrices
Matrices
 
Basic concepts. Systems of equations
Basic concepts. Systems of equationsBasic concepts. Systems of equations
Basic concepts. Systems of equations
 
ppt of VCLA
ppt of VCLAppt of VCLA
ppt of VCLA
 
Matrices and determinats
Matrices and determinatsMatrices and determinats
Matrices and determinats
 
MATRICES
MATRICESMATRICES
MATRICES
 
Matrices
MatricesMatrices
Matrices
 
matrices and function ( matrix)
matrices and function ( matrix)matrices and function ( matrix)
matrices and function ( matrix)
 
Presentation On Matrices Mathematics DIU
Presentation On Matrices Mathematics DIUPresentation On Matrices Mathematics DIU
Presentation On Matrices Mathematics DIU
 
Matrix and its applications by mohammad imran
Matrix and its applications by mohammad imranMatrix and its applications by mohammad imran
Matrix and its applications by mohammad imran
 
intruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptxintruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptx
 
Matrix_PPT.pptx
Matrix_PPT.pptxMatrix_PPT.pptx
Matrix_PPT.pptx
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
 
Matrix and Matrices
Matrix and MatricesMatrix and Matrices
Matrix and Matrices
 
Matrices and Determinants
Matrices and DeterminantsMatrices and Determinants
Matrices and Determinants
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 
Engg maths k notes(4)
Engg maths k notes(4)Engg maths k notes(4)
Engg maths k notes(4)
 
matrix algebra
matrix algebramatrix algebra
matrix algebra
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinants
 
Unit i
Unit iUnit i
Unit i
 
Calculus and matrix algebra notes
Calculus and matrix algebra notesCalculus and matrix algebra notes
Calculus and matrix algebra notes
 

More from Umar Farooq

Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
Umar Farooq
 
Linq in C#
Linq in C#Linq in C#
Linq in C#
Umar Farooq
 
Creating Windows-based Applications Part-I
Creating Windows-based Applications Part-ICreating Windows-based Applications Part-I
Creating Windows-based Applications Part-I
Umar Farooq
 
Building .NET-based Applications with C#
Building .NET-based Applications with C#Building .NET-based Applications with C#
Building .NET-based Applications with C#
Umar Farooq
 
Selection Sort
Selection Sort Selection Sort
Selection Sort
Umar Farooq
 
Week 9 IUB c#
Week 9 IUB c#Week 9 IUB c#
Week 9 IUB c#
Umar Farooq
 
Polymorphism, Abstarct Class and Interface in C#
Polymorphism, Abstarct Class and Interface in C#Polymorphism, Abstarct Class and Interface in C#
Polymorphism, Abstarct Class and Interface in C#
Umar Farooq
 
Array and Collections in c#
Array and Collections in c#Array and Collections in c#
Array and Collections in c#
Umar Farooq
 
C# (This keyword, Properties, Inheritance, Base Keyword)
C# (This keyword, Properties, Inheritance, Base Keyword)C# (This keyword, Properties, Inheritance, Base Keyword)
C# (This keyword, Properties, Inheritance, Base Keyword)
Umar Farooq
 
Software process model
Software process modelSoftware process model
Software process model
Umar Farooq
 

More from Umar Farooq (10)

Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
 
Linq in C#
Linq in C#Linq in C#
Linq in C#
 
Creating Windows-based Applications Part-I
Creating Windows-based Applications Part-ICreating Windows-based Applications Part-I
Creating Windows-based Applications Part-I
 
Building .NET-based Applications with C#
Building .NET-based Applications with C#Building .NET-based Applications with C#
Building .NET-based Applications with C#
 
Selection Sort
Selection Sort Selection Sort
Selection Sort
 
Week 9 IUB c#
Week 9 IUB c#Week 9 IUB c#
Week 9 IUB c#
 
Polymorphism, Abstarct Class and Interface in C#
Polymorphism, Abstarct Class and Interface in C#Polymorphism, Abstarct Class and Interface in C#
Polymorphism, Abstarct Class and Interface in C#
 
Array and Collections in c#
Array and Collections in c#Array and Collections in c#
Array and Collections in c#
 
C# (This keyword, Properties, Inheritance, Base Keyword)
C# (This keyword, Properties, Inheritance, Base Keyword)C# (This keyword, Properties, Inheritance, Base Keyword)
C# (This keyword, Properties, Inheritance, Base Keyword)
 
Software process model
Software process modelSoftware process model
Software process model
 

Recently uploaded

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 

Recently uploaded (20)

The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 

Matrix

  • 1.
  • 2. A matrix is a collection of numbers arranged into a fixed number of rows and columns. A matrix is defined as an ordered rectangular of numbers. They can be used to represent systems of linear equations. Matrix Dimensions: The numbers of rows and columns of a matrix are called its dimensions. Here is a matrix with three rows and two columns: a2 a2 a3 a3 a9 a0 A = 3x2 In above example, Capital A is the Matrix name and small “a” is an element name and value of those elements or matrix is subscript of “a”.
  • 3. There are several types of matrices, but the most commonly used are:  Rows Matrix  Columns Matrix  Rectangular Matrix  Square Matrix  Diagonal Matrix  Scalar Matrix  Identity Matrix  Triangular Matrix  Null or Zero Matrix  Transpose of a Matrix
  • 4.  Rows Matrix A matrix is said to be a row matrix if it has only one row. A=[123]  Columns Matrix A matrix is said to be a column matrix if it has only one column. B =  Rectangular Matrix A matrix is said to be rectangular if the number of rows is not equal to the number of columns. A= 1 2 3 1 2 8 5 6 9
  • 5.  Square Matrix A matrix is said to be square if the number of rows is equal to the number of columns. A=  Diagonal Matrix A square matrix is said to be diagonal if at least one element of principal diagonal is non-zero and all the other elements are zero. A=  Scalar Matrix A diagonal matrix is said to be scalar if all of its diagonal elements are the same. A= 1 2 3 6 7 8 9 6 5 1 0 0 0 2 0 0 0 3 2 0 0 0 2 0 0 0 2
  • 6.  Identity Matrix A diagonal matrix is said to be identity if all of its diagonal elements are equal to one, denoted by I.  Triangular Matrix A square matrix is said to be triangular if all of its elements below the principal diagonal are zero (lower triangular matrix) or all of its elements above the principal diagonal are zero (upper triangular matrix). (Lower Triangular Matrix) (Upper Triangular Matrix) 1 0 0 0 1 0 0 0 1 I = A = 1 0 0 2 4 0 3 5 6 1 2 3 0 4 5 0 0 6 A =
  • 7.  Null or Zero Matrix A matrix is said to be a null or zero matrix if all of its elements are equal to zero. It is denoted by O. ,  Transpose of a Matrix Suppose A is a given matrix, then the matrix obtained by interchanging its rows into columns is called the transpose of A. It is denoted by At then 0 0 0 0 0 0 0 0 0 O = 0 0 0 0 0 0O = 1 2 3 8 4 6A = 1 8 2 4 3 6 At =
  • 8. • Multiplication of a Matrix by a Scalar A matrix can be multiplied by a scalar (by a real number) as follows: To multiply a matrix by a scalar, multiply each element of the matrix by the scalar. Here is an example of this. (In this example, the variable a is a scalar.) 1 2 3 8 4 6a = 1a 2a 3a 8a 4a 6a
  • 9. • Matrix Addition If two matrices have the same number of rows and same number of columns, then the matrix sum can be computed: If A is an MxN matrix, and B is also an MxN matrix, then their sum is an MxN Matrix formed by adding corresponding elements of A and B Here is an example of this: 1 2 3 8 4 6 + 1 2 3 8 4 6 = 2 4 6 16 8 12
  • 10. The determinant is a value that can be computed from the elements of a square matrix. The determinant of a matrix A is denoted by det(A) or |A|. It can be viewed as the scaling factor of the transformation described by the matrix. In the case of a 2 × 2 matrix the specific formula for the determinant is: A = a b c d = ad-bc
  • 11. In the case of a 3 X 3 matrix the specific formula for the determinant is: A = a b c d e f g h i = a e f h i - b d f g i + c d e g h = aei + bfg + cdh – ceg – bdi – afh.
  • 12. For a square matrix A, the inverse is written A-1 When A is multiplied by A-1 the result is the identity matrix I. Non-square matrices do not have inverses. Note: Not all square matrices have inverses. A square matrix which has an inverse is called invertible or nonsingular, and a square matrix without an inverse is called noninvertible or singular.
  • 13.
  • 14. Here's a C program to enter values in a matrix and print values in a matrix using For Loops and Nested Loops with output and explanation. # include <stdio.h> # include <conio.h> void main() { int mat[10][10] ; int i, j, row, col ; clrscr() ; printf("Enter the order of the matrix : ") ; scanf("%d %d", &row, &col) ; printf("nEnter the elements of the matrix : nn"); for(i = 0 ; i < row ; i++) for(j = 0 ; j < col ; j++) scanf("%d", &mat[i][j]) ; printf("nnThe elements in the matrix are: nn"); for(i = 0 ; i < row ; i++) { for(j = 0 ; j < col ; j++) { printf("%d", mat[i][j]) ; printf("t"); } printf("n"); } getch() ; } Output of above program - Enter the order of the matrix : 3 3 Enter the elements of the matrix : 1 2 3 4 5 6 7 8 9 The elements in the matrix are: 1 2 3 4 5 6 7 8 9