Sunidhi Bansal has Published 1078 Articles

Program to check if two given matrices are identical in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 10:55:03

1K+ Views

Given two matrix M1[r][c] and M2[r][c] with ‘r’ number of rows and ‘c’ number of columns, we have to check that the both given matrices are identical or not. If they are identical then print “Matrices are identical” else print “Matrices are not identical”Identical MatrixTwo matrices M1 and M2 are ... Read More

Program to check if a matrix is symmetric in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 10:40:30

735 Views

In linear algebra a matrix M[][] is said to be a symmetric matrix if and only if transpose of the matrix is equal to the matrix itself. A transpose of a matrix is when we flip the matrix over its diagonal, which resultant switches its row and columns indices of ... Read More

Program to check if a matrix is Binary matrix or not in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 08:39:54

370 Views

A binary matrix is a matrix whose all elements are binary values i.e., 0 or 1. Binary matrix can be also called Boolean matrix, Relational Matrix, Logical matrix.Given below the example           $$\begin{bmatrix} 0 & 1 & 0\ 1 & 1 & 0\ 1 & 0 & ... Read More

Program for Markov matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 08:18:42

510 Views

Given a matrix M[r][c] with ‘r’ number of rows and ‘c’ number of columns, we have to check that the given matrix is Markov matrix or not. If the input matrix is Markov matrix then print the output “It is a Markov matrix” and “it’s not an Markov matrix” if ... Read More

Program for Identity Matrix in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 08:05:23

1K+ Views

Given a square matrix M[r][c] where ‘r’ is some number of rows and ‘c’ are columns such that r = c, we have to check that ‘M’ is identity matrix or not.Identity MatrixIdentity matrix is also known as Unit matrix of size nxn square matrix where diagonal elements will only ... Read More

Program to check if matrix is upper triangular in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 07:39:19

869 Views

Given a square matrix M[r][c] where ‘r’ is some number of rows and ‘c’ are columns such that r = c, we have to check that ‘M’ is upper triangular matrix or not.Upper Triangular MatrixUpper triangular matrix is a matrix in which the elements above the main diagonal(including the main ... Read More

Program to check if matrix is lower triangular in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 07:32:35

602 Views

Given a square matrix M[r][c] where ‘r’ is some number of rows and ‘c’ are columns such that r = c, we have to check that ‘M’ is lower triangular matrix or not.Lower Triangular Matrix −Lower triangular matrix is a matrix in which the elements below the main diagonal(including the ... Read More

Program to check Involutory Matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 07:25:46

190 Views

Given a matrix M[r][c], ‘r’ denotes number of rows and ‘c’ denotes number of columns such that r = c forming a square matrix. We have to check whether the given square matrix is an Involutory matrix or not.Involutory MatrixA matrix is called Involutory matrix if and only if, when ... Read More

Program to check idempotent matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 07:17:38

381 Views

Given a matrix M[r][c], ‘r’ denotes number of rows and ‘c’ denotes number of columns such that r = c forming a square matrix. We have to check whether the given square matrix is an Idempotent matrix or not.Idempotent MatrixA matrix ‘M’ is called Idempotent matrix if and only the ... Read More

Program to check diagonal matrix and scalar matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 07:07:15

631 Views

Given a matrix M[r][c], ‘r’ denotes number of rows and ‘c’ denotes number of columns such that r = c forming a square matrix. We have to find whether the given square matrix is diagonal and scalar matrix or not, if it is diagonal and scalar matrix then print yes in the result.Diagonal matrixA ... Read More

Advertisements