How to find the Diagonal of a Matrix?
Last Updated :
31 Jul, 2022
British Mathematician Arthur Cayley was the first person to develop the algebraic aspect of the matrix. After that, Psychiat Heisenberg used matrices as a tool to explain his famous Quantum principle. The study of matrices originated while solving different types of simple and complex linear problems, which is cumbersome to solve without matrices. A rectangular array of mn numbers in the form of m horizontal lines called rows, and n vertical lines called columns is called a matrix of order m x n. This arrays is enclosed by [ ] or ( ) or || || . Each number of the m x n matrix is known as the element of the matrix. A matrix is generally denoted by capital alphabetical characters, and its element is denoted by small alphabetical characters with suffix ij, which indicates to row and column number, i.e. aij, is called elements of matrix A.
A= \begin{bmatrix} 2 & 6 & 4 \\ 1 & 2 & 3 \\ 8 &9 &7 \end{bmatrix}
- The elements of the matrix may be scalar or vector quantity.
- A matrix is only an arrangement of numbers; it has no definite value. i.e. [5] ≠5.
Some important terms related to matrix
- Elements of a Matrix: Each of the M, N numbers of the Matrix is called an element or an entry of the Matrix.
- Notation of a Matrix: A matrix is generally represented by the symbols [aij] or (aij) or ||aij||. A matrix is denoted by a single capital letter such as A, B, C etc.
- Order of a Matrix: A matrix having m rows and n columns is said to be a matrix of order m x n.
Diagonal Elements of a Matrix
An element aij of a matrix A = [aij] is a diagonal elements of matrix if i = j, such as when rows and column suffixes are equal. Thus, a11 , a22 , a33, a44, ... so on are diagonal elements of the matrix A = [aij].
- Principal Diagonal of a Matrix
The principal diagonal is also known as the leading diagonal. The diagonal of a square matrix running from the upper left entities to the lower right entities are principal diagonal of a matrix.
A = \begin{bmatrix} a_{11} & 0 & 0 \\ 0 & a_{22} & 0 \\ 0 & 0 & a_{33} \end{bmatrix}
Here, Principal Diagonal elements are non-zeroes.
It's also called anti diagonal of a matrix. The diagonal of a square matrix running from the upper right entities to the lower-left entities is called the counter diagonal of a matrix.
B = \begin{bmatrix} 0 & 0 & b_{13} \\ 0 & b_{22} & 0 \\ b_{31} & 0 & 0 \end{bmatrix}
Here, Counter diagonal elements are non-zeroes.
Note: Above, we considered examples in principal and counter diagonal. Elements of the matrix other than diagonal are considered as zeroes for better clarification.
Sample problems
Question 1: Find out the diagonal element of the below matrix.
A = \begin{bmatrix} 9 & 0 & 25 \\ 0 & 8 & 0 \\ 0 & 0 & 1 \end{bmatrix}
Solution:
As we know, To find the diagonal of matrix or diagonal elements is not a heavy task; it is just a basic practice of matrices. If anyone told us to find the diagonal element, we only found the principal diagonal as a result. which is running from the upper left entities to the lower right entities
Diagonal element of matrix,
a11 = 9, a22 = 8, a33 = 1
Question 2: Find trace of matrix A, given below.
A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 2 & 0 \\ 5 & 0 & 5 \end{bmatrix}
Solution:
Trace of matrix: It's actually sum of principal diagonal element.
tr(A) = a11 + a22 + a33;
So, after observation of matrix
We can say, a11 = 1, a22 = 2, a33 = 5
tr(a) = 1 + 2 + 5 = 8
Question 3: Find the inverse of diagonal matrix:
A = \begin{bmatrix} 2 & 0 & 0 \\ 0 & -3 & 0 \\ 0 & 0 & 5 \end{bmatrix}
Solution:
Determinant of matrix of A,
|A| = -30
Adjoint of matrix A,
adj(A) = \begin{bmatrix} -15 & 0 & 0 \\ 0 & 10 & 0 \\ 0 & 0 & -6 \end{bmatrix}
We know inverse of matrix A is: A-1 = \frac{adj(A)}{|A|}
A-1 = \begin{bmatrix} \frac{1}{2} & 0 &0 \\ 0 & \frac{-1}{3}& 0 \\ 0 & 0 & \frac{1}{5} \end{bmatrix}
Question 4: Find value of a11 + a23 - a22 + a31 from given below matrix.
A = \begin{bmatrix} 8 & 2 & 5 \\ 0 & 2 & 9 \\ 5 & 6 & 5 \end{bmatrix}
Solution:
We know standard matrix syntax.
A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21}& a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}
By comparing it to our matrix we can say,
a11 = 8, a23 = 9, a22 = 2, a31 = 5
Required result: a11 + a23 - a22 + a31 = 8 + 9 - 2 - 5 = 10
Question 5: Find the product of diagonal element of below matrix:
A = \begin{bmatrix} 2 & 5 & 6 \\ 1 & 4 & 8 \\ 4 & 2 & 1 \end{bmatrix}
Solution:
The diagonal element of the above matrix are 2, 4, and 1, respectively
Product of diagonal: 2 × 4 × 1 = 8
Question 6: Find the determinant of the matrix given below:
A = \begin{bmatrix} 5 & 2 & 6 \\ 4 & 1 & 8 \\ 2 & 4 & 1 \end{bmatrix}
Solution:
Determinant of matrix A,
|A| = 5 (1 - 32) - 2 (16 - 4) + 6 (16 - 2)
|A| = 5(-31) - 2(12) + 6(14)
|A| = -155 - 24 + 84 = -95
Question 7: Find the sum of counter diagonal of matrix , common element of principle and counter diagonal:
A = \begin{bmatrix} 8 & 2 & 5 \\ 0 & 2 & 9 \\ 5 & 6 & 5 \end{bmatrix}
Solution:
We know square matrix running from the upper right entities to the lower left entities are counter diagonals of matrix.
So, counter diagonal elements are
a13 = 5 a22 = 2 a31 = 5
The common element of principal and counter diagonal is 2.
Similar Reads
Non-linear Components In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co
11 min read
Spring Boot Tutorial Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance
10 min read
Class Diagram | Unified Modeling Language (UML) A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact
12 min read
Backpropagation in Neural Network Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and
9 min read
3-Phase Inverter An inverter is a fundamental electrical device designed primarily for the conversion of direct current into alternating current . This versatile device , also known as a variable frequency drive , plays a vital role in a wide range of applications , including variable frequency drives and high power
13 min read
Polymorphism in Java Polymorphism in Java is one of the core concepts in object-oriented programming (OOP) that allows objects to behave differently based on their specific class type. The word polymorphism means having many forms, and it comes from the Greek words poly (many) and morph (forms), this means one entity ca
7 min read
CTE in SQL In SQL, a Common Table Expression (CTE) is an essential tool for simplifying complex queries and making them more readable. By defining temporary result sets that can be referenced multiple times, a CTE in SQL allows developers to break down complicated logic into manageable parts. CTEs help with hi
6 min read
What is Vacuum Circuit Breaker? A vacuum circuit breaker is a type of breaker that utilizes a vacuum as the medium to extinguish electrical arcs. Within this circuit breaker, there is a vacuum interrupter that houses the stationary and mobile contacts in a permanently sealed enclosure. When the contacts are separated in a high vac
13 min read
Python Variables In Python, variables are used to store data that can be referenced and manipulated during program execution. A variable is essentially a name that is assigned to a value. Unlike many other programming languages, Python variables do not require explicit declaration of type. The type of the variable i
6 min read
Spring Boot Interview Questions and Answers Spring Boot is a Java-based framework used to develop stand-alone, production-ready applications with minimal configuration. Introduced by Pivotal in 2014, it simplifies the development of Spring applications by offering embedded servers, auto-configuration, and fast startup. Many top companies, inc
15+ min read