Matrix Data StructureLast Updated : 03 Aug, 2023ReadDiscussCoursesComplete Guide to Arrays & MatrixLearn more about Matrix in DSA Self Paced CoursePractice Problems on MatrixTop Quizzes on MatrixWhat is Matrix Data Structure?A matrix represents a collection of numbers arranged in an order of rows and columns. It is necessary to enclose the elements of a matrix in parentheses or brackets.For example:A matrix with 9 elements is shown below.This Matrix M has 3 rows and 3 columns. Each element of matrix M can be referred to by its row and column number. For example, M[2][3] = 6.Topics:IntroductionBasic Operations on MatrixStandard problems on MatrixQuick LinksIntroduction:Introduction to Matrix or Grid – Data Structure and Algorithms TutorialRow-wise vs column-wise traversal of matrixApplications of Matrices and DeterminantsBasic Operations on Matrix:Traverse a given Matrix using RecursionRotate Matrix ElementsSort the given matrixSearch element in a sorted matrixProgram to find transpose of a matrixAdjoint and Inverse of a MatrixDeterminant of a MatrixStandard problems on Matrix:Easy:Print matrix in zag-zag fashionProgram for scalar multiplication of a matrixPrint a given matrix in spiral formFind distinct elements common to all rows of a matrixFind unique elements in a matrixFind maximum element of each row in a matrixShift matrix elements row-wise by kSwap major and minor diagonals of a square matrixSquares of Matrix Diagonal ElementsSum of middle row and column in MatrixProgram to check idempotent matrixProgram to check diagonal matrix and scalar matrixProgram for Identity MatrixMirror of matrix across diagonalProgram for addition of two matricesProgram for subtraction of matricesMedium:Program for Conway’s Game Of LifeProgram to multiply two matricesRotate a matrix by 90 degree without using any extra spaceCheck if all rows of a matrix are circular rotations of each otherGiven a matrix of ‘O’ and ‘X’, find the largest subsquare surrounded by ‘X’Maximum size square sub-matrix with all 1sCount zeros in a row wise and column wise sorted matrixQueries in a MatrixFind pairs with given sum such that elements of pair are in different rowsFind all permuted rows of a given row in a matrixFind number of transformation to make two Matrix EqualInplace (Fixed space) M x N size matrix transposeMinimum flip required to make Binary Matrix symmetricMagic SquareHard:Find the number of islandsA Boolean Matrix QuestionMatrix Chain MultiplicationMaximum size rectangle binary sub-matrix with all 1sConstruct Ancestor Matrix from a Given Binary TreePrint K’th element in spiral form of matrixFind size of the largest ‘+’ formed by all ones in a binary matrixShortest path in a Binary MazePrint maximum sum square sub-matrix of given sizeValidity of a given Tic-Tac-Toe board configurationMinimum Initial Points to Reach DestinationStrassen’s Matrix MultiplicationMaximum sum rectangle in a 2D matrixProgram for Sudoku GeneratorQuick Links:‘Practice Problems’ on Matrix‘Quizzes’ on Matrix‘Video Tutorials’ on MatrixRecomended:Learn Data Structure and Algorithms | DSA TutorialIf you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.