Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Order of Matrix

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Order of the matrix defines the number of rows and columns that a matrix has. In a matrix, data is arranged as an array of elements. This data is arranged in rows and columns, and the number of rows and columns any matrix has defines the Order of the matrix. Suppose any matrix has 5 rows and 3 columns then the order of the matrix is 5×3.

In this article, we will learn about the order of matrices in detail.

What is Order of Matrix?

Order of the matrix is referred to as the number of rows and columns. It indicates the dimension of a matrix and also gives the number of elements in a matrix. If a matrix has “m” rows and “n” columns, then the order of the matrix is said to be “m × n,” and the matrix will have “mn” elements. For example, the matrix given below has 4 rows and 5 columns. So, the order of the matrix is “4 × 5” and the matrix has 20 elements.

order of matrix

 

Note: The first number in the order of a matrix always represents the number of rows in the matrix, while the second number represents the number of columns in the matrix.

How to Determine the Order of Matrix?

Order of the matrix is determined by the number of rows and columns present in the matrix. For example, if a matrix has “m” rows and “n” columns, then the order of the matrix is said to be “m × n.” Now, let us look at some examples to understand the concept better.

P = \left[\begin{array}{cccc} 2 & 4 & 6 & 8\end{array}\right]

We can see that the matrix P has 1 row and 4 columns. So, the order of the matrix P is written as “1 × 4.”

Q = \left[\begin{array}{ccc} a & b & c\\ d & e & f \end{array}\right]

We can see that the matrix Q has 2 rows and 3 columns. So, the order of the matrix Q is written as “2 × 3.”

R = \left[\begin{array}{ccc} 1 & 0 & 5\\ 6 & -4 & 8\\ 7 & 3 & 9 \end{array}\right]

We can see that the matrix R has 3 rows and 3 columns. So, the order of the matrix R is written as “3 × 3.”

Note: If a matrix has “mn” elements, then the product of m and n can be written in more than one way, i.e., 1 × mn, m × n, n × m, mn × 1. So, if a matrix has “mn” elements, then the order of the matrix can be written in different ways for the given number of elements.

Type of Matrices Based on Order of Matrix

The order of a matrix indicates its dimension and also defines the various types of matrices. The following are some different matrices that are classified based on the order of a matrix.

Singleton Matrix

A singleton matrix is defined as a matrix that has only one element, i.e., it has only one row and one column. So, the order of a singleton matrix is “1 × 1”

  • Matrix given below is a singleton matrix.

A = \left[\begin{array}{c} 23\end{array}\right]

Row Matrix

A row matrix is defined as a matrix that has only one row. A matrix “A = [aij]” is said to be a row matrix if the order of the matrix is “1 × n”

  • Matrix given below is a row matrix of order “1 × 3”

B = \left[\begin{array}{ccc} -1 & 0 & 1\end{array}\right]

Column Matrix

A column matrix is defined as a matrix that has only one column. The matrix “A = [aij]” is said to be a column matrix if the order of the matrix is “m × 1”

  • Matrix given below is a row matrix of order “4 × 1”

C = \left[\begin{array}{c} p\\ q\\ r\\ s \end{array}\right]

Rectangular Matrix

A rectangular matrix is defined as a matrix that does not have an equal number of rows and columns. The order of a rectangular matrix that has “m” rows and “n” columns is “m × n” 

  • Matrix given below is a row matrix of order “2 × 3”

D = \left[\begin{array}{ccc} 12 & 14 & 16\\ 6 & 7 & 8 \end{array}\right]

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” 

  • Matrix given below is a row matrix of order “2 × 2”

E = \left[\begin{array}{cc} 3 & 6\\ 9 & 15 \end{array}\right]

Important Points on Order of Matrix

Following are some important points on the order of a matrix:

  • The first number in the order of a matrix will always represent the number of rows in the matrix, while the second number represents the number of columns in the matrix.
  • The addition or subtraction of any two matrices is possible if the order of the two matrices is the same.
  • Multiplication of any two matrices is possible only when the number of columns in the first matrix is equal to the number of rows in the second matrix.
  • If the order of a matrix is “m × n,” then the order of its transpose matrix will be “n × m,” where a transpose matrix is formed by changing the rows of a matrix into columns and its columns into rows.

Also, Check

Solved Examples on Order of Matrix

Example 1: Determine the order of the matrix given below.

A = \left[\begin{array}{cccc} 12 & 0 & -9 & 15\\ 23 & 19 & 33 & -8\\ 17 & 35 & -24 & 41\\ 27 & -7 & 39 & 11\\ 10 & 31 & 25 & 43 \end{array}\right]

Solution:

Number of rows in the given matrix A = 5

Number of columns in the given matrix A = 4

We know that the order of the matrix = number of rows × number of columns

Therefore, the order of the given matrix A = 5 × 4

Example 2: If “P” is a matrix of order “2 × 3” and “Q” is a matrix of order “3 × 3”, then what is the order of the matrix “P + Q”?

Solution:

Given data:

The order of the matrix “P” = “2 × 3”

The order of the matrix “Q” = “3 × 3”

We can see that the order of the given matrices is different. So, the “P + Q” matrix does not exist, as we cannot add two matrices of different orders.

Example 3: Determine the order of the matrix, if a matrix “B” has ten elements in total.

Solution:

Given data:

Number of elements in matrix B = 10

Now, write all the possible factors of 10.

10 = 1 × 10

10 = 2 × 5

10 = 5 × 2

10 = 10 × 1

Hence, we have four different ways to write the order of a matrix “B”, for the given number of elements they are A1×10, A2×5, A5×2 A10×1

Example 4: Determine the types of matrices based on the order of the matrices.

  • A2×3 
  • B1×5
  • C4×4
  • D2×1

Solution:

  • A2×3  The given matrix “A” has two rows and three columns. So, “A” is a rectangular matrix as the number of rows in the matrix is not equal to the number of columns.
  • B1×5 The given matrix “B” has one row and five columns. So, “B” is a row matrix as it has one row and five columns.
  • C4×4 The given matrix “C” has four rows and four columns. So, “A” is a square matrix as the number of rows in the matrix is equal to the number of columns.
  • D2×1 The given matrix “D” has one column and two rows. So, “D” is a column matrix as it has one column and two rows.

FAQs on Order of Matrix

Question 1: What is meant by a matrix?

Answer:

A “matrix” is referred to as a rectangular array of numbers that are arranged in rows and columns.

Question 2: What is meant by the order of a matrix?

Answer:

In a matrix, the number of rows and columns is expressed by the order of the matrix. It indicates the dimension of a matrix and also gives the number of elements in a matrix.

Question 3: What is a singleton matrix?

Answer:

A singleton matrix is defined as a matrix that has only one element, i.e., it has only one row and one column. So, the order of a singleton matrix is “1 × 1.”

Question 4: How can we determine the number of elements from the order of the matrix?

Answer:

We know that the order of a matrix is equal to the product of the number of rows and columns. So, this product gives us the number of elements in a matrix. For example, if a matrix has “m” rows and “n” columns, then the order of the matrix is said to be “m × n,” and the matrix will have “mn” elements. 


My Personal Notes arrow_drop_up
Last Updated : 26 Mar, 2023
Like Article
Save Article
Similar Reads
Related Tutorials