SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

presentation on matrix
 presentation on matrix presentation on matrix
presentation on matrix
Nikhi Jain
 
Introduction to Matrices
Introduction to MatricesIntroduction to Matrices
Introduction to Matrices
holmsted
 
Applications of matrices in real life
Applications of matrices in real lifeApplications of matrices in real life
Applications of matrices in real life
SuhaibFaiz
 

Mais procurados (20)

Matrix.
Matrix.Matrix.
Matrix.
 
Matrix and Determinants
Matrix and DeterminantsMatrix and Determinants
Matrix and Determinants
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
Lesson 3 - matrix multiplication
Lesson 3 - matrix multiplicationLesson 3 - matrix multiplication
Lesson 3 - matrix multiplication
 
presentation on matrix
 presentation on matrix presentation on matrix
presentation on matrix
 
Matrices
Matrices Matrices
Matrices
 
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES, INTRODUCTION TO MATRICES, TYPES OF MATRICES,
INTRODUCTION TO MATRICES, TYPES OF MATRICES,
 
Matrix and it's Application
Matrix and it's ApplicationMatrix and it's Application
Matrix and it's Application
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
Matrices And Determinants
Matrices And DeterminantsMatrices And Determinants
Matrices And Determinants
 
Introduction to matices
Introduction to maticesIntroduction to matices
Introduction to matices
 
Matrices
MatricesMatrices
Matrices
 
Determinants
DeterminantsDeterminants
Determinants
 
Matrices
MatricesMatrices
Matrices
 
Determinants
DeterminantsDeterminants
Determinants
 
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
 
Trace of Matrix - Linear Algebra
Trace of Matrix - Linear AlgebraTrace of Matrix - Linear Algebra
Trace of Matrix - Linear Algebra
 
Application of matrices in Daily life
Application of matrices in Daily lifeApplication of matrices in Daily life
Application of matrices in Daily life
 
Introduction to Matrices
Introduction to MatricesIntroduction to Matrices
Introduction to Matrices
 
Applications of matrices in real life
Applications of matrices in real lifeApplications of matrices in real life
Applications of matrices in real life
 

Semelhante a Matrix

Basic concepts. Systems of equations
Basic concepts. Systems of equationsBasic concepts. Systems of equations
Basic concepts. Systems of equations
jorgeduardooo
 
MATRICES
MATRICESMATRICES
MATRICES
daferro
 
Matrices and determinats
Matrices and determinatsMatrices and determinats
Matrices and determinats
daferro
 
Matrices
MatricesMatrices
Matrices
daferro
 
matrices and function ( matrix)
matrices and function ( matrix)matrices and function ( matrix)
matrices and function ( matrix)
রেজা তানজিল
 
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
 

Semelhante a Matrix (20)

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
MATRICESMATRICES
MATRICES
 
Matrices and determinats
Matrices and determinatsMatrices and determinats
Matrices and determinats
 
Matrices
MatricesMatrices
Matrices
 
matrices and function ( matrix)
matrices and function ( matrix)matrices and function ( matrix)
matrices and function ( matrix)
 
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
 
Matrices
MatricesMatrices
Matrices
 
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
 
BASIC CONCEPT OF MATRIX.pptx
BASIC CONCEPT OF MATRIX.pptxBASIC CONCEPT OF MATRIX.pptx
BASIC CONCEPT OF MATRIX.pptx
 
MATRICES.pdf
MATRICES.pdfMATRICES.pdf
MATRICES.pdf
 

Mais de 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
 

Mais de 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
 

Último

Último (20)

Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

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