# Category Archives: Matrix

## Minimum operations required to make each row and column of matrix equals

Given a square matrix of size . Find minimum number of operation are required such that sum of elements on each row and column becomes… Read More »

## Diagonally Dominant Matrix

In mathematics, a square matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in… Read More »

## Count sub-matrices having sum divisible ‘k’

Given a n x n matrix of integers and a positive integer k. The problem is to count all sub-matrices having sum divisible by the… Read More »

## Multiplication of Matrix using threads

Multiplication of matrix does take time surely. Time complexity of matrix multiplication is O(n^3) using normal matrix multiplication. And Strassen algorithm improves it and its… Read More »

## Minimum flip required to make Binary Matrix symmetric

Given a Binary Matrix of size N X N, consisting of 1s and 0s. The task is to find the minimum flips required to make… Read More »

## Maximum product of 4 adjacent elements in matrix

Given a square matrix, find the maximum product of four adjacent elements of matrix. The adjacent elements of matrix can be top, down, left, right,… Read More »

## Pascal Matrix

In mathematics, particularly in matrix theory and combinatorics, the Pascal Matrix is an infinite matrix containing the binomial coefficients as its elements. There are three… Read More »

## Program to check if matrix is lower triangular

Given a square matrix and the task is to check the matrix is in lower triangular form or not. A square matrix is called lower… Read More »

## Count of possible hexagonal walks

We are given an infinite two dimensional plane made of hexagons connected together. We can visualize this plane as a honeycomb. Element X is present… Read More »

## Program to check if matrix is upper triangular

Given a square matrix and the task is to check the matrix is in upper triangular form or not. A square matrix is called upper… Read More »

## Check if possible to cross the matrix with given power

Given a matrix of N X M, each cell consist of an integer. We have initial power of K and we are allowed to move… Read More »

## Find trace of matrix formed by adding Row-major and Column-major order of same matrix

Given two integers N and M. Consider two matrix ANXM, BNXM. Both matrix A and matrix B contains elements from 1 to N*M. Matrix A… Read More »

## Maximum sum path in a matrix from top to bottom

Consider a n*n matrix. Suppose each cell in the matrix has a value assigned. We can go from each cell in row i to a… Read More »

## Frequencies of even and odd numbers in a matrix

Given a matrix of order m*n then the task is to find the frequency of even and odd numbers in matrix Examples: Input : m… Read More »

## Program for Identity Matrix

Introduction to Identity Matrix : The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or… Read More »