Square Matrix: A matrix is defined as a rectangular array of numbers that are arranged in rows and columns. A square matrix is characterized by having the same number of rows as columns. It's referred to as an m x m matrix, indicating that it is a square matrix of order ?m. When two square matrices are either multiplied or added, the resultant matrix retains the same order. For example, consider the square matrix X given by
X = \begin{bmatrix}
2 & -7 & 7 \\
2 & 5 & 6 \\
5 & 4 & 3
\end{bmatrix}
In this article, we will learn about what is a square matrix, along with its examples, properties, types, formula, and some problems on square matrix.
What is a Square Matrix?
A square matrix is defined as a matrix that has an equal number of rows and columns. The order of a square matrix that has "n" rows and "n" columns is "n × n." The number of elements in a matrix can be determined by the product of the number of rows and columns in the matrix. So, the number of elements in a square matrix is always a perfect square number. If any two square matrices of the same order are added or multiplied, the order of the resultant matrix remains the same.
Square Matrix DefinitionSquare Matrix Definition
A square matrix is a matrix with the same number of rows and columns. It is an n x n matrix, where n represents the number of rows or columns.
Square Matrix Examples
Some common examples of square matrices of different orders are given below:
- Following matrix is a square matrix of order "2 × 2," i.e., the given matrix has two rows and two columns.
A_{2\times2} = \left[\begin{array}{cc} p & q\\ r & s \end{array}\right]
- Following matrix is a square matrix of order "3 × 3," i.e., the given matrix has three rows and three columns.
B_{3\times3} = \left[\begin{array}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{array}\right]
- Following matrix is a square matrix of order "n × n," i.e., the given matrix has "n" rows and "n" columns.
A_{n\times n} = \left[\begin{array}{cccccc} a_{11} & a_{12} & a_{13} & . & . & a_{1n}\\ a_{21} & a_{22} & a_{23} & . & . & a_{2n}\\ a_{31} & a_{32} & a_{33} & . & . & a_{3n}\\ . & . & . & . & . & .\\ . & . & . & . & . & .\\ a_{n1} & a_{n2} & a_{n3} & . & . & a_{nn} \end{array}\right]
Properties of a Square Matrix
The following are some important properties of a square matrix:
- In every square matrix, the number of rows and columns is equal.
- The sum of all principal diagonal elements in a square matrix is defined as the trace of a matrix.
- The determinant value can be determined only for square matrices.
- If the determinant of a square matrix is zero, then the matrix is called a singular matrix, whereas it is said to be non-singular if its determinant is not equal to zero.
- If the principal diagonal elements in a square matrix are ones and the rest of the elements are zeros, then the matrix is called an identity matrix.
- The order of a square matrix and its transpose are the same.
Types of Square Matrix
We have various types of square matrices, such as identity matrices, singular matrices, non-singular matrices, symmetric matrices, etc.
- Singular Matrix: If the determinant of a square matrix is zero, then the matrix is called a singular matrix.
"A" is a square matrix of order "n × n" and is said to be a singular matrix if |A| = 0.
- Scalar Matrix: A scalar matrix is a square matrix whose principal diagonal elements are equal and the rest of the elements are zeros.
- Identity Matrix: An identity matrix is a square matrix whose principal diagonal elements are ones and the rest of the elements are zeros.
- Symmetric Matrix: A symmetric matrix is a square matrix whose transpose is the same as the original matrix.
"A" is a square matrix of order "n × n" and is said to be a symmetric matrix if AT = A.
- Skew-Symmetric Matrix: A skew-symmetric matrix is a square matrix whose transpose is equal to the negative of the original matrix.
"A" is a square matrix of order "n × n" and is said to be a symmetric matrix if AT = −A.
- Orthogonal Matrix: An orthogonal matrix is a square matrix whose inverse is equal to the transpose of the matrix.
"A" is a square matrix of order "n × n" and is said to be an orthogonal matrix if A-1 = AT.
Addition and Subtraction of Square Matrices
We can perform various mathematical operations on a square matrix, such as addition, multiplication, etc. When two square matrices of the same order are added or subtracted, the resultant matrix is obtained when corresponding elements are added or subtracted.
If A = \left[\begin{array}{cc} a & b\\ c & d \end{array}\right] and B = \left[\begin{array}{cc} p & q\\ r & s \end{array}\right] are two square matrices of order "2 × 2," then A\pm B = \left[\begin{array}{cc} a\pm p & b\pm q\\ c\pm r & d\pm s \end{array}\right] .
- If A and B are two square matrices of the same order, then A + B = B + A.
Multiplication of Square Matrices
If are A = \left[\begin{array}{cc} a & b\\ c & d \end{array}\right] and B = \left[\begin{array}{cc} p & q\\ r & s \end{array}\right] are two square matrices of order "2 × 2," then
A\times B = \left[\begin{array}{cc} a & b\\ c & d \end{array}\right] \times \left[\begin{array}{cc} p & q\\ r & s \end{array}\right]
A\times B = \left[\begin{array}{cc} (a\times p)+(b\times q) & (a\times r)+(b\times s)\\ (c\times p)+(d\times q) & (c\times r)+(d\times s) \end{array}\right] .
Determinant of a Square Matrix
The determinant of a square matrix is a scalar value or a summary value that represents the entire set of elements in the matrix. The determinant of a "2 × 2" square matrix can be easily determined using the formula, which is the difference of the product of the matrix's principal diagonal elements.
If A = \left[\begin{array}{cc} a & b\\ c & d \end{array}\right] is a square matrix of order "2 × 2," then the formula to calculate its determinant is given as follows:
|A| or det A = [ad – bc]
Inverse of a Square Matrix
Inverse operation can be performed on the square matrix. Division of a matrix can be achieved using the inverse of a Matrix. Inverse of a matrix is found after the determinant of the Square Matrix is calculated. After that Adjoint of the Square matrix is found. Then Inverse is calculated as,
A-1= adj. A / |A|
Articles Related to Square Matrix:
Solved Examples on Square Matrix
Example 1: Calculate the determinant of the square matrix given below.
P = \left[\begin{array}{cc} -3 & 5\\ -2 & 0 \end{array}\right]
Solution:
Given matrix, P = \left[\begin{array}{cc} -3 & 5\\ -2 & 0 \end{array}\right]
|P| = (-3 × 0) – (–2 × 5)
|P| = 0 – (–10) = 10
Hence, the determinant of the given matrix is 10.
Example 2: Find whether the matrix given below is a singular matrix or not.
B = \left[\begin{array}{cc} 0 & 4\\ 4 & 0 \end{array}\right]
Solution:
To find whether the matrix given below is singular or not, we have to calculate its determinant.
|B| = (4 × 4) – (0 × 0) = 16 ≠ 0
As the determinant of the given matrix is not equal to zero, the given matrix is non-singular.
Example 3: Determine the inverse of the matrix given below.
A = \left[\begin{array}{cc} 1 & -2\\ 6 & 7 \end{array}\right]
Solution:
If A = \left[\begin{array}{cc} a & b\\ c & d \end{array}\right] , then
A^{-1} = \frac{1}{ad-bc} \left[\begin{array}{cc} d & -b\\ -c & a \end{array}\right]
A^{-1} = \frac{1}{7+12} \left[\begin{array}{cc} 7 & 2\\ -6 & 1 \end{array}\right]
A^{-1} = \frac{1}{19}\left[\begin{array}{cc} 7 & 2\\ -6 & 1 \end{array}\right]
A^{-1}= \left[\begin{array}{cc} \frac{7}{19} & \frac{2}{19}\\ \frac{-6}{19} & \frac{1}{19} \end{array}\right]
Example 4: Find whether the matrix given below is symmetric or not.
A = \left[\begin{array}{ccc} 2 & 0 & 6\\ 5 & 4 & 9\\ 1 & 3 & -5 \end{array}\right]
Solution:
"A" is a square matrix of order "n × n" and is said to be a symmetric matrix if AT = A.
The given matrix, A = \left[\begin{array}{ccc} 2 & 0 & 6\\ 5 & 4 & 9\\ 1 & 3 & -5 \end{array}\right]
A^{T} = \left[\begin{array}{ccc} 2 & 5 & 1\\ 0 & 4 & 3\\ 6 & 9 & -5 \end{array}\right] ≠ A
Since, AT ≠ A, the given square matrix is not symmetric.
Similar Reads
What is Promotion Mix?
Meaning of Promotion Mix The last element of the marketing mix is promotion, which includes activities undertaken by the marketer to communicate with the customers and distribution channels so they can enhance the sales of the firm. Through promotional communication, an organisation's aim is to info
5 min read
Objections to Advertising
Any paid form of non-personal presentation and promotion of goods and services by an identified sponsor is known as Advertising. It is one of the most popular tools of promotion. The main aim of advertising is to increase the demand and sale of goods and services. Newspapers, televisions, magazines,
4 min read
Bi-Wizard School Coding Tournament By GeeksforGeeks - For Class 8-12 Students
Bi-Wizard School Coding Tournament by GeeksforGeeks - 'Coding is the New Literacy' and no one can deny this fact! And especially, when it comes to young ones or school students, investing the time & efforts in learning programming skill become more & more advantageous and rewarding. Let us t
5 min read
GEEK-O-LYMPICS 2022 - May The Geeks Force Be With You!
Is it possible to have tons of fun while maintaining your competitive spirit? Totally! It is 100% possible. For the geeks who code hard and play harder, Geek-O-Lympics is back yet again this year. Join this fun and frolic event of the month where you'll get to code while enjoying tons of activities
4 min read
Khalsa College of Engineering and Technology Fest Experience (Tech Fest 2024)
Hey! I'm so excited to tell you about my awesome time at Tech Fest 2024 at Khalsa College of Engineering and Technology which was a cool event. I got to present my paper on "AI in Cybersecurity," and guess what? I won first prize! I made sure my presentation was fun and easy to understand. I used lo
2 min read
#geekstreak2024 â 21 Days POTD Challenge Powered By Deutsche Bank
Consistency is the key to success, but staying consistent can be challenging. To help motivate you on this journey, we're offering a stylish backpack from Deutsche Bank as a reward! All you need to do is maintain a 21-day streak of solving the Problem of the Day (POTD) on GeeksforGeeks, starting fro
2 min read
Geek Week 2021 - The Biggest Festival For Programmers
The month of October brings along with itself festive vibes, good food & so many holidays too! Add to all that, a bit of geeky-ness. GeeksforGeeks is here to be a part of your October journey with our own festival too because, why not? For all the programmers out there, Geek Week 2021 is finally
5 min read
Geeks Summer Carnival 2022 - Your Best Investment of the Year
"Buy the dip"... "Invest in XYZ Mutual Fund" ⦠"Invest in NFTs"... and many more investment advice you must be getting on a regular basis but what if we tell you that this summer, you are about to get a golden opportunity to invest in something that will be your best career investment of the year wi
5 min read
11 Best Chatgpt Prompts for Affiliate Marketing
Affiliate marketing is a performance-based job where individuals or companies earn commissions for promoting products or services through referral links. There has been a growing number of people who are opting for this at-home method of earning and therefore efficiency becomes important. Here is wh
9 min read
Geeks Summer Carnival - The Biggest Coding Festival is Back!
The opening breeze of summer has already blown - and like always, it has come up with a lot of positive and fun vibes. Some of you must be bringing out your shades and heading towards the beach, some of you would have planned to binge-watch on Netflix, and yes, how can we forget that IPL is also the
5 min read