Consider a n×n lower triangular matrix, which is stored in row major order where each element occupies s bytes of memory space, then the address of an element A[i][j] can be given as
A
A[i][j]=(i−j)+[(i−j)n−(j−1)(j−2)2]×S
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
A[i][j]=(j−1)+i(i−1)2×n
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
A[i][j]=b+[(i−1)+i(j−1)2]×S
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
A[i][j]=b+[(i−j)n−j(j−1)2]×S
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is CA[i][j]=b+[(i−1)+i(j−1)2]×S The matrix where the entries below the main diagonal are zero is called the upper triangular matrix.
Where as if all the entries above the main diagonal in the matrix are zero it is called as a lower triangular matrix.
The address of an element A[i][j]. can be given as : A[i][j]=b+[(i−1)+i(j−1)2]×S