• retagged by
800 views

2 Answers

1 1 vote
Let's take an upper triangular matrix for proper visualization :-

$a_{11} \ a_{12} \ ............ a_{1n}$

$0 \ \ \ \ a_{22} \ .............a_{2n}$

.

.

.

$0 \ \ \ \ 0..........................a_{nn}$

 

What would be the determinant of this matrix ?

One observation , if we see the last row of the matrix , only one element is non-zero , others are 0 , thus anyway they're contributing 0 to the final determinant ,

Thus the determinant will be $a_{nn}*A[n-1][n-1]$.

In $A[n-1][n-1]$ it can be observed that , last row in $A[n-1][n-1]$ has only $a_{n-1n-1}$ as non-zero , others are 0 , so they'll only contribute 0 to the final determinant .

Thus $det(A) = a_{nn}*a_{n-1n-1}A[n-2][n-2]$.

Thus we can see a recursive behavior here.

Thus the determinant can be written as ,

$det(A) = a_{nn}*a_{n-1n-1}*.......a_{11}$.

which is nothing but product of the diagonal elements of the array.

how can this be found?

$for(i=1;i<=n;i++)\{\\det*=A[i][i];\\\}$.

This has a complexity of $\Theta(n)$
0 0 votes

Matrix is upper triangular so determinant = multiplication of all diagonal elements

Diagonal elements = n so complexity = theta(n)

Position:
Show:

Related questions

0 0 votes
1 1 answer
778
778 views
rsansiya111 asked Sep 10, 2022
778 views
Let A be a sorted array of distinct integers of length n. Design an algorithm to find an index i such that A[i] = i if such an index exists. If there are more than one su...
0 0 votes
0 0 answers
1.2k
1.2k views
SPluto asked May 2, 2019
1,243 views
Let SP be the problem of finding the shortest path between 2 nodes, and LP be the problem of finding the longest path between 2 nodes, in an unweighted, undirected graph....
0 0 votes
0 0 answers
698
698 views
utpal podder asked Feb 13, 2019
698 views
1 1 vote
1 1 answer
503
503 views
Shreya Roy asked Feb 28, 2017
503 views
If a graph has k-independent components, it it n-k+1 colorable