The Wayback Machine - https://web.archive.org/web/20240905195807/https://www.geeksforgeeks.org/minors-and-cofactors/
Open In App

Minors and Cofactors

Last Updated : 31 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Minors and Cofactors are important to calculate the adjoint and inverse of a matrix. As the name suggests, a Minor is a smaller part of the larger matrix obtained for a particular element of the matrix by deleting the terms of the row and column to which the element belongs. A cofactor is (-1)i+j times the minor of the matrix.

They are the backbones of Linear Algebra and are used to find the value of a matrix’s determinant, adjoint, and inverse. Other than that there are many use cases in computer science for minors and cofactors. In this article, we will study minors and cofactors in detail. Other than that, we will also learn about the determinants, matrix inversion, and many more.

Minors and Cofactors of Determinants

Minors of a matrix are the determinants of the smaller matrices that are left after removing one row and one column from the original matrix and the cofactor of an element is calculated by multiplying the minor​ by (−1)i+j which accounts for the position of the element within the matrix.

To understand minors and cofactors, we should understand about determinants first.

What is the Determinant of a Matrix?

Determinant are useful for solving linear equations, capturing how linear transformations change area or volume, and changing variables in integrals. The determinant can be viewed as a function whose input is a square matrix and whose output is a number. In simple language, we can say, that to every small matrix A, we can associate a number (real or complex) which is called the determinant of a square matrix A. 

The determinant of a matrix A can be easily represented as det(A) or |A|.

 Determinant of a Matrix

Minor of a Matrix

Minor of an element aij of a determinant is a determinant obtained by deleting the ith row and jth column in which element aij lies. Minor of an element aij is denoted by Mij

How to Find Minor of a Matrix?

Use the following steps to find the minor of any given matrix:

Step 1: Hide the ith row and jth column of the matrix A, where the element aij lies. 

Step 2: Now compute the determinant of the matrix after the row and column is removed using step 1.

Step 3: Result of Step 2 is the minor for he elelment of the ith row and jth column, then repeat the process for each element of the matrix to find the minor for all the elements of the matrix.

Sample Problems on Minor of a Matrix

Problem 1: If the matrix [Tex] \bold{A = \begin{bmatrix} 1&2&3\\ 2&0&1\\ 5&3&6 \end{bmatrix}}    [/Tex]then find the minor of  a22.

Solution:

In this question, we have to find out the minor of a22, the element present at a22 is 0. As we learn from our definition of a minor we have to delete the ith row and jth columns at which our asked element is present. Below image is demonstrating how to delete the ith row and jth column

minor of  a22

After deletion, we write our left element as it is and do cross multiplication.

Minor of element a22 =[Tex] \begin{vmatrix} 1&3\\ 5& 6 \end{vmatrix} [/Tex]

⇒ Minor of element a22 = 6 – 15 = -9

Note: Always remember, after the multiplication of the left diagonal element in the second-dimensional determinant, always put the -ve sign then do the multiplication of right diagonal elements and solve them out.

Problem 2: If the matrix [Tex]\bold{A = \begin{bmatrix} 1 & 0 & 4\\ 3 & 5 &-1\\ 0 & 1 & 2 \end{bmatrix}}            [/Tex], then find the minor of a32.

Solution:

In the above question we have asked to find out the minor of a32 element which is 1. So as we did in this above problem same procedure we will follow. So firstly we have to delete the ith row and jth column at which our element is present.

minor of a32

So we had canceled the ith row and jth column at which our element is present. So write the elements which are left as it is.

Then do the cross multiplication and solve:

Minor of element a32 =[Tex] \begin{vmatrix} 1&4\\ 3& -1 \end{vmatrix} [/Tex]

Minor of element a32 = -1 -12 = -13

Cofactor of a Matrix

Co-factor of an element aij of a determinant, denoted by Aij or Cij, and is defined as follows:

Cij = (-1)i+j Mij 

Where,

  • Mij is the minor of the element aij, and 
  • i and j respectively reprensent the number of row and column of the element (position).

Sample Problems on Cofactors of a Matrix

Problem 1: If a matrix A is  [Tex]\bold{|A| = \begin{vmatrix} 5&3&1\\ 2&0&-1\\1&2&3 \end{vmatrix}}    [/Tex]write the cofactor of the element a32.

Solution:

As asked in question we have to find the co factor of element a32 which means our row (i) = 3 and column (j) = 2 so we have row and column as we do to find the minor by deleting the rows and column at which asked element exist we do the same in this question to and then put that in our formula -> Aij = (-1)i+j  Mij

Cofactor of elements [Tex]= (-1)^{3+2}\begin{vmatrix}5 & 1\\2&-1 \end{vmatrix}[/Tex]

⇒ Cofactor of element = (-1)(-5 – 2) = 7

So after putting in the formula of finding cofactor and doing expansion of determinant we get (-1) (-5 – 2) which on solving gives the answer 7, this is our required answer.

Problem 2: If Aij of the element aij of the determinant is given below, then write the value of a32 . A32.

[Tex] \bold{|A| = \begin{vmatrix} 2&-3&5\\ 6&0&4\\1&5&-7 \end{vmatrix}} [/Tex]

Solution: 

In the question, we are having determinant. So we have row and column given in the question.

Here, a32 = 5 (second element of third row)

Given, Aij is the cofactor of the element aij of A . So now we can solve this question by putting the values in the formula of cofactor as discussed in above question.

Cofactor of elements (A32)[Tex]= (-1)^{3+2}\begin{vmatrix}2 &5\\6&4 \end{vmatrix} [/Tex]

⇒ Cofactor of element (A32) = (-1)(8 – 30) = 22

 a32 . A32 = 5 . 22 = 110

So, 110 is our required answer.

Application of Minors and Cofactors

Minors and Cofactors are used in the calculation of the following terms:

Adjoint of Matrix

To calculate the adjoint of Matrix, you need to follow the following steps:

Step 1: Calculate the cofactors of each element of a given matrix.

Step 2: Construct the matrix from the cofactor of elements.

Step 3: Calculate the Transpose of the resultant matrix in Step 2.

Step 4: Resulting matrix of Step 3 is the adjoint of the given matrix.

Example: Find the adjoint of the following matrix A;

[Tex]\bold{A = \begin{bmatrix} 1&2&3\\ 4 &5 &6\\ 7&8&9 \end{bmatrix}} [/Tex]

Solution:

Step 1: Compute the cofactors of each element in A.

C11 = 5 × 9 – 6 × 8 = -3
C12 = -(4 × 9 – 6 × 7) = 6
C13 = 4 × 8 – 5 × 7 = -3
C21 = -(2 × 9 – 3 × 8) = 6
C22 = 1 × 9 – 3 × 7 = -6
C23 = -(1 × 8 – 2 × 7) = 3
C31 = 2 × 6 – 3 × 5 = -3
C32 = -(1 × 6 – 3 × 4) = 6
C33 = 1 × 5 – 2 × 4 = -3

Step 2: Construct the matrix of cofactors.

Matrix of cofactors, [Tex]C = \begin{bmatrix} -3&6&-3\\ 6&-6&3\\ -3&6&-3 \end{bmatrix} [/Tex]

Step 3: Transpose the matrix of cofactors.

[Tex]C’ = \begin{bmatrix} -3&6&-3\\ 6&-6&6\\ -3&3&-3 \end{bmatrix} [/Tex]

Step 4: The resulting matrix is the adjoint of A.

[Tex]adj(A) = C’ = \begin{bmatrix} -3&6&-3\\ 6&-6&6\\ -3&3&-3 \end{bmatrix} [/Tex]

Inverse of Matrix

To calculate the inverse of a matrix, you can use the following steps:

Step 1: Calculate the determinant of the given matrix.

Step 2: If the value of the determinant is zero, then the matrix has no inverse. Otherwise, calculate the adjoint of the matrix using the steps mentioned in the previous heading.

Step 3: Use the formula [Tex]A^{-1} = \frac{adj(A)}{|A|} [/Tex], to calculate the inverse of the given matrix.

Example: Find the inverse of the following matrix A:

[Tex]\bold{A = \begin{bmatrix} 2&-1&0\\ -1 &2 &-1\\ 0&-1&2 \end{bmatrix}} [/Tex]

Solution:

Step 1: Find the determinant of A.

det(A) = 2(2 × 2 – (-1) × (-1)) – (-1)((-1) ×2 – (-1) ×0) + 0 

⇒ det(A) = 6 – 2 = 4

Step 2: Calculate the adjoint of A using the steps mentioned in the previous example.

C11 = 4 – 1 = 3
C12 = -(-2 – 0) = 2
C13 = 1 – 0 = 1
C21 = -(-2 – 0) = 2
C22 = 4 – 0 = 4
C23 = -(-2 – 0) = 2
C31 = (1 – 0) = 1
C32 = -(-2 – 0) = 2
C33 = 4 – 1 = 3

Matrix of cofactors,

[Tex]C = \begin{bmatrix} 3&2&1\\ 2&4&2\\ 1&2&3 \end{bmatrix} [/Tex]

Transpose of matrix of cofactors,

[Tex]adj(A) = C’ =  \begin{bmatrix} 3&2&1\\ 2&4&2\\ 1&2&3 \end{bmatrix} [/Tex]

Step 3: Multiply the adjoint of A by the reciprocal of the determinant.

[Tex] A^{-1} = \frac{adj(A)}{4} = \frac{1}{4} \times\begin{bmatrix} 3&2&1\\ 2&4&2\\ 1&2&3 \end{bmatrix} [/Tex]

[Tex]\Rightarrow A^{-1}= \begin{bmatrix} \frac{3}{4}&\frac{2}{4}&\frac{1}{4}\\ \frac{2}{4}&\frac{4}{4}&\frac{2}{4}\\ \frac{1}{4}&\frac{2}{4}&\frac{3}{4} \end{bmatrix} [/Tex]

[Tex]\Rightarrow A^{-1}= \begin{bmatrix} \frac{3}{4}&\frac{1}{2}&\frac{1}{4}\\ \frac{1}{2}&1&\frac{1}{2}\\ \frac{1}{4}&\frac{1}{2}&\frac{3}{4} \end{bmatrix} [/Tex]

People Also Read:

Minors and Cofactors Class 12

Minors and cofactors of a matrix are important concepts used in the calculation of determinants and in solving systems of linear equations especially for class 12.

FAQs on Minors and Cofactors

What is a Minor in Matrix Algebra?

 In matrix algebra, a minor refers to the determinant of a smaller matrix obtained by deleting one or more rows and columns from a larger matrix.

What is a Cofactor in Matrix Algebra?

In matrix algebra, the cofactor of an element in a matrix is defined as the signed minor obtained by deleting the row and column containing that element, and multiplying the resulting determinant by -1 if the sum of the row and column indices is odd.

What is the Relationship between Minors and Cofactors?

The cofactor of an element in a matrix is equal to the product of the minor of that element and (-1)^(i+j), where i and j are the row and column indices of the element, respectively.

What is the use of Minors and Cofactors in Matrix?

Minors and cofactors are used in the computation of the inverse of a matrix, as well as in the calculation of determinants and solutions to systems of linear equations.

How are Minors and Cofactors used to calculate the Inverse of a Matrix?

To calculate the inverse of a matrix we first need to calculate the cofactor matrix of any given matrix, then transpose of cofactor matrix is called adjoint. Then dividing adjoint by determinant to get the inverse of the matrix.

Can Minors and Cofactors be used to solve systems of Linear Equations?

Yes, minors and cofactors can be used to solve systems of linear equations by representing the system in the form of a matrix and using Cramer’s rule, which expresses the solution in terms of determinants of smaller matrices obtained by replacing one column of the coefficient matrix with the constant terms of the system.

What is Laplace’s Expansion Formula?transformations

Laplace’s expansion formula is a method for computing the determinant of a matrix by summing the products of the elements in any row or column with their corresponding cofactors. It is given as [Tex]det(A) = \sum_{j =1}^{n}(-1)^{i+j}b_{i,j}m_{i,j} [/Tex]



Previous Article
Next Article

Similar Reads

Cofactors
Cofactors are non-protein chemical compounds or metallic ions that are essential for an enzyme's biological activity. They can be organic molecules, called coenzymes, or inorganic ions. The cofactor's function is to assist enzymes in catalyzing reactions by stabilizing transition states, enhancing substrate binding, or participating directly in the
5 min read
Difference between Receipt and Payment Account And Income and Expenditure Account
An organisation that works with the motive to render services to society and not profit-making is also known as a Non-Trading Organisation. NPO is a separate legal entity and is not owned by any individual or an enterprise. Not-for-Profit Organisations maintain books of accounts following the double-entry system of accounting. Organizations with lo
5 min read
Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
Given three positive integers N, A, and B. The task is to count the numbers of length N containing only digits A and B and whose sum of digits also contains the digits A and B only. Print the answer modulo 109 + 7.Examples: Input: N = 3, A = 1, B = 3 Output: 1 Possible numbers of length 3 are 113, 131, 111, 333, 311, 331 and so on... But only 111 i
15 min read
Count ways to generate pairs having Bitwise XOR and Bitwise AND equal to X and Y respectively
Given two integers X and Y, the task is to find the total number of ways to generate a pair of integers A and B such that Bitwise XOR and Bitwise AND between A and B is X and Y respectively Examples: Input: X = 2, Y = 5Output: 2Explanation:The two possible pairs are (5, 7) and (7, 5).Pair 1: (5, 7)Bitwise AND = 5 & 7 = 2Bitwise XOR = 5 ^ 7 = 5P
7 min read
Sum of Bitwise AND of sum of pairs and their Bitwise AND from a given array
Given an array arr[] consisting of N integers, the task is to find the sum of Bitwise AND of (arr[i] + arr[j]) and Bitwise AND of arr[i] and arr[j] for each pair of elements (arr[i], arr[j]) from the given array. Since the sum can be very large, print it modulo (109 + 7). Examples: Input: arr[] = {8, 9}Output: 0Explanation: The only pair from the a
9 min read
Max count of N using digits of M such that 2 and 5, and, 6 and 9 can be treated as same respectively
Given an integer N, and the string integer M, the task is to find the total count to make N by using the digits of string M. Also, digit 2 can be treated as digit 5, and digit 6 can be treated as digit 9 and vice versa and each digit from the string M can be used at most once. Examples: Input: N = 6, M = "245769"Output: 2Explanation: Digits 5 and 6
12 min read
Reduce Array and Maximize sum by deleting one occurrence of A[i] and all occurrences of A[i]+1 and A[i]-1
Given an array A[] having N positive integers, the task is to perform the following operations and maximize the sum obtained while reducing the array: Select an array element (say A[i]) and delete one occurrence of that element and add A[i] to the sum.Delete all the occurrences of A[i]-1 and A[i]+1.Perform these operations until the array is empty.
8 min read
Difference between Income and Expenditure A/c and Profit and Loss A/c
Income and Expenditure A/c and Profit and Loss A/c are two different accounts that are often confused as the same. The former is an account which is prepared by NPOs on an accrual basis to record income and expenses of revenue nature only. However, the latter is prepared by organisations with profit-earning motive. These organisations prepare Profi
2 min read
Balance of Payments: Surplus and Deficit, Autonomous and Accommodating Transactions, Errors and Omissions
A balance of payment (BoP) is a summary statement that lists all of the transactions that took place within a specific period between the resident and the outside world. The Balance of Payment indicates the extent to which a country saves enough money to cover its imports. It also reveals whether the country produces adequate economic output to fun
14 min read
If a and b are the roots of the equation x2 + bx + a = 0, and a, b ≠ 0, then find the values of a and b
Values of a and b are –2 and 1, respectively, if a and b are Roots of Equation x2 + bx + a = 0, and a, b ≠ 0, then find Values of a and b. Now let's find the solution for the same. If a and b are Roots of Equation x2 + bx + a = 0, and a, b ≠ 0, then find Values of a and b.Solution: Given equation, x2 + bx + a = 0, a ≠ 0, b ≠ 0, a, b ∈ R.a and b are
5 min read
Difference between Profit and Loss Account And Profit and Loss Appropriation Account
In the words of Prof. Carter "A Profit and Loss Account is an account into which all gains and losses are collected in order to ascertain the excess of gains over the losses or vice-versa." What is a Profit and Loss Account?Profit and Loss Account is prepared by every organisation to know about the profit earned and loss incurred by the organisatio
3 min read
Multiply two integers without using multiplication, division and bitwise operators, and no loops
By making use of recursion, we can multiply two integers with the given constraints. To multiply x and y, recursively add x y times. Approach: Since we cannot use any of the given symbols, the only way left is to use recursion, with the fact that x is to be added to x y times. Base case: When the numbers of times x has to be added becomes 0. Recurs
9 min read
If tan A = 5 and tan B = 4, then find the value of tan(A - B) and tan(A + B)
Trigonometry is a discipline of mathematics that studies the relationships between the lengths of the sides and angles of a right-angled triangle. Trigonometric functions, also known as goniometric functions, angle functions, or circular functions, are functions that establish the relationship between an angle to the ratio of two of the sides of a
5 min read
Count of Ways to Choose N People With at Least X Men and Y Women from P Men and Q Women | Set 2
Given integers N, P, Q, X, and Y, the task is to find the number of ways to form a group of N people having at least X men and Y women from P men and Q women, where (X + Y ≤ N, X ≤ P and Y ≤ Q). Examples: Input: P = 4, Q = 2, N = 5, X = 3, Y = 1Output: 6Explanation: Suppose given pool is {m1, m2, m3, m4} and {w1, w2}. Then possible combinations are
7 min read
Python counter and dictionary intersection example (Make a string using deletion and rearrangement)
Given two strings, find if we can make first string from second by deleting some characters from second and rearranging remaining characters. Examples: Input : s1 = ABHISHEKsinGH : s2 = gfhfBHkooIHnfndSHEKsiAnG Output : Possible Input : s1 = Hello : s2 = dnaKfhelddf Output : Not Possible Input : s1 = GeeksforGeeks : s2 = rteksfoGrdsskGeggehes Outpu
2 min read
Rearrange array such that arr[i] >= arr[j] if i is even and arr[i]<=arr[j] if i is odd and j < i
Given an array of n elements. Our task is to write a program to rearrange the array such that elements at even positions are greater than all elements before it and elements at odd positions are less than all elements before it.Examples: Input : arr[] = {1, 2, 3, 4, 5, 6, 7} Output : 4 5 3 6 2 7 1 Input : arr[] = {1, 2, 1, 4, 5, 6, 8, 8} Output : 4
11 min read
Find speed of man from speed of stream and ratio of time with up and down streams
Program to find the speed of man in km/hr, given the speed of stream in km/hr. Assume that the man takes n times (where n > 1) as long to row upstream as to row downstream the river.Examples: Input : 5.5 4 Output : speed of man is 9.16667 km/hr Input : 4 3 Output : speed of man is 8 km/hr Approach Used :Let speed of the man in still water = x km
4 min read
Substrings starting with vowel and ending with consonants and vice versa
Given a string s, count special substrings in it. A Substring of S is said to be special if either of the following properties is satisfied. It starts with a vowel and ends with a consonant.It starts with a consonant and ends with a vowel. Examples: Input : S = "aba" Output : 2 Substrings of S are : a, ab, aba, b, ba, a Out of these only 'ab' and '
15+ min read
Comparison of an Array and Hash table in terms of Storage structure and Access time complexity
Arrays and Hash Tables are two of the most widely used data structures in computer science, both serving as efficient solutions for storing and accessing data in Java. They have different storage structures and time complexities, making them suitable for different use cases. In this article, we will explore the differences between arrays and hash t
3 min read
Reach A and B by multiplying them with K and K^2 at every step
We are given two numbers A and B, we need to write a program to determine if A and B can be reached starting from (1, 1) following the given steps. Start from (1, 1) and at every step choose a random number K and multiply K to any one of the two numbers obtained in the previous step and K2 to the other number. Examples: Input: A = 3, B = 9 Output:
6 min read
Queries to insert, delete one occurrence of a number and print the least and most frequent element
Given Q queries of type 1, 2, 3 and 4 as described below. Type-1: Insert a number to the list.Type-2: Delete only one occurrence of a number if exists.Type-3: Print the least frequent element, if multiple elements exist then print the greatest among them.Type-4: Print the most frequent element, if multiple elements exist then print the smallest amo
14 min read
Maximize the sum of X+Y elements by picking X and Y elements from 1st and 2nd array
Given two arrays of size N, and two numbers X and Y, the task is to maximize the sum by considering the below points: Pick x values from the first array and y values from the second array such that the sum of X+Y values is maximum.It is given that X + Y is equal to N. Examples: Input: arr1[] = {1, 4, 1}, arr2[] = {2, 5, 3}, N = 3, X = 2, Y = 1 Outp
12 min read
Sum of elements in range L-R where first half and second half is filled with odd and even numbers
Given a number N, create an array such the first half of the array is filled with odd numbers till N, and the second half of the array is filled with even numbers. Also given are L and R indices, the task is to print the sum of elements in the array in the range [L, R]. Examples: Input: N = 12, L = 1, R = 11 Output: 66 The array formed thus is {1,
15+ min read
Segregating negative and positive maintaining order and O(1) space
Segregation of negative and positive numbers in an array without using extra space, and maintaining insertion order and in O(n^2) time complexity. Examples: Input :9 12 11 -13 -5 6 -7 5 -3 -6 Output :-13 -5 -7 -3 -6 12 11 6 5 Input :5 11 -13 6 -7 5 Output :-13 -7 11 6 5 We have discussed this problem below posts. ers-beginning-positive-end-constant
7 min read
Split array to three subarrays such that sum of first and third subarray is equal and maximum
Given an array of N integers, the task is to print the sum of the first subarray by splitting the array into exactly three subarrays such that the sum of the first and third subarray elements are equal and the maximum. Note: All the elements must belong to a subarray and the subarrays can also be empty. Examples: Input: a[] = {1, 3, 1, 1, 4} Output
13 min read
Queries to add, remove and return the difference of maximum and minimum.
Given Q queries. The queries are of three types and are described below: Add the number num to the list.Remove the number num from the list.Return the difference between the maximum and minimum number in the list. The task is to write a program the performs the above queries. Note: The numbers are distinct and at every call of query-3, there will b
6 min read
Number of solutions for x < y, where a <= x <= b and c <= y <= d and x, y are integers
Given four integers a, b, c, d ( upto 10^6 ). The task is to Find the number of solutions for x < y, where a <= x <= b and c <= y <= d and x, y integers. Examples: Input: a = 2, b = 3, c = 3, d = 4 Output: 3 Input: a = 3, b = 5, c = 6, d = 7 Output: 6 Approach: Let’s iterate explicitly over all possible values of x. For one such fixe
6 min read
Sum and Product of minimum and maximum element of an Array
Given an array. The task is to find the sum and product of the maximum and minimum elements of the given array. Examples: Input : arr[] = {12, 1234, 45, 67, 1} Output : Sum = 1235 Product = 1234 Input : arr[] = {5, 3, 6, 8, 4, 1, 2, 9} Output : Sum = 10 Product = 9 Take two variables min and max to store the minimum and maximum elements of the arra
13 min read
Sum and Product of maximum and minimum element in Binary Tree
Given a Binary Tree. The task is to find the sum and product of the maximum and minimum elements in it. For example, sum of the maximum and minimum elements in the following binary tree is 10 and the product is 9. The idea is to traverse the tree and find the maximum and minimum elements in the tree and print their product and sum. To find the maxi
12 min read
Sum and Product of minimum and maximum element of Binary Search Tree
Given a Binary Search Tree. The task is to find the sum and product of the maximum and minimum value of the tree. For the above tree, the sum and product of the maximum and minimum values of the tree are 26 and 88 respectively. Approach: For the node with the minimum value: Find the leftmost leaf nodeFor the node with the maximum value: Find the ri
8 min read