{"id":2380,"date":"2026-01-05T06:12:24","date_gmt":"2026-01-05T06:12:24","guid":{"rendered":"https:\/\/www.mathros.net.ua\/en\/?p=2380"},"modified":"2026-01-19T16:48:43","modified_gmt":"2026-01-19T16:48:43","slug":"inverse-of-a-matrix-using-gauss-jordan-method","status":"publish","type":"post","link":"https:\/\/www.mathros.net.ua\/en\/inverse-of-a-matrix-using-gauss-jordan-method.html","title":{"rendered":"Inverse of a Matrix Using the Gauss\u2013Jordan Method: From Idea to a Clear Algorithm"},"content":{"rendered":"<p>The inverse of a matrix is a tool that lets you <em>\u201cundo\u201d<\/em> multiplication by a matrix and recover the original object. In linear algebra problems, you often need to restore an initial vector or the solution of a system after it has been multiplied by a matrix. We\u2019ve already looked at the <a title=\"How to find inverse of a matrix\" href=\"https:\/\/www.mathros.net.ua\/en\/inverse-of-a-matrix.html\">approach of solving the corresponding systems of linear equations<\/a>. But here\u2019s a natural question: is there a way to work with the matrix as a single object, following a clear procedure without solving many separate systems? That is exactly what the Gauss\u2013Jordan method does.<\/p>\n<p>In this article, we\u2019ll figure out why this approach is correct, how it is connected to elementary row operations, and what the algorithm looks like in matrix form. No unnecessary complications\u2014just clear, consistent steps, the way you need them for confident practical use.<\/p>\n<h2>Inverse of a Matrix: What Exactly Are We Looking For and Why?<\/h2>\n<p>Let\u2019s start with the basics. For a square matrix \\( A \\) (of size \\( n\\times n \\)), the inverse matrix \\( A^{-1} \\) is a matrix that gives the identity matrix when multiplied. In other words, we have:<\/p>\n<p>\\[<br \/>\nA \\cdot A^{-1} = I, \\qquad A^{-1} \\cdot A = I,<br \/>\n\\]<\/p>\n<p>where \\( I \\) is the <a title=\"What is a Identity matrix\" href=\"https:\/\/en.wikipedia.org\/wiki\/Identity_matrix\" target=\"_blank\" rel=\"nofollow noopener\">identity matrix<\/a>:<\/p>\n<p>\\[<br \/>\nI=<br \/>\n\\begin{pmatrix}<br \/>\n1&amp;0&amp;\\cdots&amp;0\\\\<br \/>\n0&amp;1&amp;\\cdots&amp;0\\\\<br \/>\n\\vdots&amp;\\vdots&amp;\\ddots&amp;\\vdots\\\\<br \/>\n0&amp;0&amp;\\cdots&amp;1<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<p>Why do we need this? For example, if you have a matrix equation \\(A \\cdot x = b \\), then\u2014when \\( A^{-1} \\) exists\u2014the solution can be written compactly:<\/p>\n<p>\\[<br \/>\nx=A^{-1} \\cdot b.<br \/>\n\\]<\/p>\n<p>This notation is short and convenient. But in practice, it\u2019s important to have a method that allows you to find \\( A^{-1} \\) directly, treating the matrix as a single object. That is exactly what the Gauss\u2013Jordan method is designed for.<\/p>\n<h2>Gauss\u2013Jordan Method: Inverse of a Matrix Through Elementary Row Operations<\/h2>\n<p>The Gauss\u2013Jordan method is based on elementary row operations\u2014the same kinds of steps you use when you transform a matrix into a more convenient form. The idea is straightforward: we transform the matrix \\( A \\) until it becomes the identity matrix. At the same time, under those exact same transformations, another matrix is formed\u2014and that matrix will be the inverse matrix we are looking for.<\/p>\n<p>How do we set this up? First, we build an augmented matrix by attaching the identity matrix \\( I \\) to \\( A \\):<\/p>\n<p>\\[<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\na_{11} &amp; a_{12} &amp; \\cdots &amp; a_{1n} &amp; 1 &amp; 0 &amp; \\cdots &amp; 0 \\\\<br \/>\na_{21} &amp; a_{22} &amp; \\cdots &amp; a_{2n} &amp; 0 &amp; 1 &amp; \\cdots &amp; 0 \\\\<br \/>\n\\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots &amp; \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots \\\\<br \/>\na_{n1} &amp; a_{n2} &amp; \\cdots &amp; a_{nn} &amp; 0 &amp; 0 &amp; \\cdots &amp; 1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>Next, we perform elementary row operations so that the left block becomes the identity matrix. The key point is that these operations are applied to every row of the augmented matrix, which means they affect both the left and the right blocks at the same time.<\/p>\n<p>If the matrix \\( A \\) is non-singular (that is, its determinant is not zero), then in the end we obtain:<\/p>\n<p>\\[<br \/>\n\\left(\\begin{array}{c|c}<br \/>\nA &amp; I<br \/>\n\\end{array}\\right)<br \/>\n\\Longrightarrow<br \/>\n\\left(\\begin{array}{c|c}<br \/>\nI &amp; A^{-1}<br \/>\n\\end{array}\\right),<br \/>\n\\qquad \\det(A) \\ne 0.<br \/>\n\\]<\/p>\n<p>So, the right block of the final augmented matrix is exactly the inverse matrix \\( A^{-1} \\) we wanted to find.<\/p>\n<h2>Inverse of a Matrix: The Gauss\u2013Jordan Algorithm Step by Step<\/h2>\n<p>Now let\u2019s move to a more formal description. Suppose we have a square matrix of size \\( n\\times n \\):<\/p>\n<p>\\[<br \/>\nA=\\begin{pmatrix}<br \/>\na_{11} &amp; a_{12} &amp; \\cdots &amp; a_{1n}\\\\<br \/>\na_{21} &amp; a_{22} &amp; \\cdots &amp; a_{2n}\\\\<br \/>\n\\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots\\\\<br \/>\na_{n1} &amp; a_{n2} &amp; \\cdots &amp; a_{nn}<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<p>Our goal is to obtain the inverse matrix \\( A^{-1} \\) using a sequence of elementary row operations. To do this, as mentioned earlier, we build the augmented matrix \\( \\left(A\\mid I\\right) \\), meaning we attach the identity matrix \\( I \\) of the same size to \\( A \\):<\/p>\n<p>\\[<br \/>\n\\left( A \\mid I \\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\na_{11} &amp; a_{12} &amp; \\cdots &amp; a_{1n} &amp; 1 &amp; 0 &amp; \\cdots &amp; 0 \\\\<br \/>\na_{21} &amp; a_{22} &amp; \\cdots &amp; a_{2n} &amp; 0 &amp; 1 &amp; \\cdots &amp; 0 \\\\<br \/>\n\\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots &amp; \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots \\\\<br \/>\na_{n1} &amp; a_{n2} &amp; \\cdots &amp; a_{nn} &amp; 0 &amp; 0 &amp; \\cdots &amp; 1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>Next, we work column by column from left to right. At each step, we choose a pivot element in the current column, make it equal to \\( 1 \\), and then turn all the other entries in that column into zeros\u2014both below and above the pivot row. In the end, the left block must become \\( I \\), and the right block will then be \\( A^{-1} \\).<\/p>\n<p>So, we start with the pivot element \\( a_{11} \\). First we make it equal to \\( 1 \\) (we divide the first row by \\( a_{11} \\)), and then we make all entries in the first column in rows \\( 2,3,\\dots,n \\) equal to zero. After completing this step, we get a matrix of the form:<\/p>\n<p>\\[<br \/>\n\\left(A^{(1)} \\mid B^{(1)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\n1 &amp; a^{(1)}_{12} &amp; \\cdots &amp; a^{(1)}_{1n} &amp; b^{(1)}_{11} &amp; b^{(1)}_{12} &amp; \\cdots &amp; b^{(1)}_{1n}\\\\<br \/>\n0 &amp; a^{(1)}_{22} &amp; \\cdots &amp; a^{(1)}_{2n} &amp; b^{(1)}_{21} &amp; b^{(1)}_{22} &amp; \\cdots &amp; b^{(1)}_{2n}\\\\<br \/>\n\\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots &amp; \\vdots &amp; \\vdots &amp; \\ddots &amp; \\vdots\\\\<br \/>\n0 &amp; a^{(1)}_{n2} &amp; \\cdots &amp; a^{(1)}_{nn} &amp; b^{(1)}_{n1} &amp; b^{(1)}_{n2} &amp; \\cdots &amp; b^{(1)}_{nn}<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>The entries in the left block after the first step are computed by:<\/p>\n<p>\\[<br \/>\na_{ij}^{(1)} = a_{ij} &#8211; \\frac{a_{i1}}{a_{11}}\\,a_{1j},\\qquad i=2,\\dots,n,\\; j=1,\\dots,n.<br \/>\n\\]<\/p>\n<p>And the right block follows the same pattern:<\/p>\n<p>\\[<br \/>\nb_{ij}^{(1)} = b_{ij} &#8211; \\frac{a_{i1}}{a_{11}}\\, b_{1j}, \\qquad i=2,\\dots,n,\\; j=1,\\dots,n,<br \/>\n\\]<\/p>\n<p>where initially \\( B^{(0)}=I \\).<\/p>\n<p>Next, we exclude the first row and the first column from consideration and apply the same procedure to the submatrix that starts at the element \\( a^{(1)}_{22} \\). Now we need to make the pivot element in position \\( (2,2) \\) equal to \\( 1 \\) and zero out all entries in the second column in rows \\( i\\neq2 \\). After that, the second column of the left block has a \\( 1 \\) on the diagonal and zeros everywhere else.<\/p>\n<p>Continuing in the same way for each next column, at the \\( k \\)-th step (for \\( k=1,\\dots,n \\)) we work with the pivot element \\( a^{(k-1)}_{kk} \\) and zero out the entries in column \\( k \\) for all rows \\( i\\neq k \\). For the left block, the generalized formulas are:<\/p>\n<p>\\[<br \/>\n\\begin{aligned}<br \/>\na^{(k)}_{kj} &amp;= \\frac{a^{(k-1)}_{kj}}{a^{(k-1)}_{kk}}, \\qquad j=1,\\dots,n,\\\\<br \/>\na^{(k)}_{ij} &amp;= a^{(k-1)}_{ij}-a^{(k-1)}_{ik}\\,a^{(k)}_{kj}, \\qquad i=1,\\dots,n,\\ i\\neq k,\\ j=1,\\dots,n.<br \/>\n\\end{aligned}<br \/>\n\\]<\/p>\n<p>For the right block, the formulas are analogous:<\/p>\n<p>\\[<br \/>\n\\begin{aligned}<br \/>\nb^{(k)}_{kj} &amp;= \\frac{b^{(k-1)}_{kj}}{a^{(k-1)}_{kk}}, \\qquad j=1,\\dots,n,\\\\<br \/>\nb^{(k)}_{ij} &amp;= b^{(k-1)}_{ij}-a^{(k-1)}_{ik}\\,b^{(k)}_{kj}, \\qquad i=1,\\dots,n,\\ i\\neq k,\\ j=1,\\dots,n.<br \/>\n\\end{aligned}<br \/>\n\\]<\/p>\n<p>After performing the steps \\( k=1,2,\\dots,n \\), the left block of the augmented matrix becomes the identity matrix:<\/p>\n<p>\\[<br \/>\n\\left( A^{(n)} \\mid B^{(n)} \\right)=\\left( I \\mid A^{-1} \\right).<br \/>\n\\]<\/p>\n<p>So, the right block after all transformations is the desired inverse matrix \\( A^{-1} \\).<\/p>\n<h3>What If the Pivot Element Is Zero?<\/h3>\n<p>In practice, it can happen that the pivot element you want to start eliminating with (for example, \\( a_{11} \\), or later \\( a^{(1)}_{22} \\), \\( a^{(2)}_{33} \\), and so on) is equal to zero. In that situation, it is enough to swap rows so that a nonzero number moves into the pivot position. Since a row swap is an elementary operation, the algorithm can then continue in the usual way.<\/p>\n<p>But if, in the given column, all possible candidates for the pivot element are zero, then it is impossible to turn the left block into \\( I \\). That means the inverse matrix does not exist (the matrix \\( A \\) is singular).<\/p>\n<h2>Inverse of a Matrix in Practice: From Row Operations to the Final Answer<\/h2>\n<p>Now let\u2019s move to practice, because the Gauss\u2013Jordan method becomes truly clear when you see it in action. We will work with the augmented matrix \\( \\left(A\\mid I\\right) \\) and step by step transform the left block into \\( I \\).<\/p>\n<h3 class=\"example\">Example 1. Find the inverse of a matrix<\/h3>\n<p>\\[<br \/>\nA=<br \/>\n\\begin{pmatrix}<br \/>\n2 &amp; -1 &amp; 4 \\\\<br \/>\n4 &amp; -2 &amp; 8 \\\\<br \/>\n6 &amp; -3 &amp; 12<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<p>We write the augmented matrix:<\/p>\n<p>\\[<br \/>\n\\left(A^{(0)}\\mid B^{(0)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{ccc|ccc}<br \/>\n2 &amp; -1 &amp; 4 &amp; 1 &amp; 0 &amp; 0 \\\\<br \/>\n4 &amp; -2 &amp; 8 &amp; 0 &amp; 1 &amp; 0 \\\\<br \/>\n6 &amp; -3 &amp; 12 &amp; 0 &amp; 0 &amp; 1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>We start with the pivot element \\( a_{11}=2 \\). We divide the first row by \\( 2 \\), and then we zero out the first column in rows \\( 2 \\) and \\( 3 \\):<\/p>\n<ul>\n<li>From the second row we subtract the first row multiplied by \\( 4 \\).<\/li>\n<li>From the third row we subtract the first row multiplied by \\( 6 \\).<\/li>\n<\/ul>\n<p>This gives:<\/p>\n<p>\\[<br \/>\n\\left(A^{(1)} \\mid B^{(1)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{ccc|ccc}<br \/>\n1 &amp; -0.5 &amp; 2 &amp; 0.5 &amp; 0 &amp; 0 \\\\<br \/>\n0 &amp; 0 &amp; 0 &amp; -2 &amp; 1 &amp; 0 \\\\<br \/>\n0 &amp; 0 &amp; 0 &amp; -3 &amp; 0 &amp; 1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>Here you can see the key point: in the left block, zero rows have appeared, but in the right block the corresponding rows are not zero. This means it is impossible to transform the left block into \\( I \\), so the inverse of \\( A \\) does not exist. The reason is clear: the rows of the matrix are linearly dependent (the second row is \\( 2 \\) times the first, and the third row is \\( 3 \\) times the first).<\/p>\n<h3 class=\"example\">Example 2. Find the inverse of a matrix<\/h3>\n<p>\\[<br \/>\nA=<br \/>\n\\begin{pmatrix}<br \/>\n5 &amp; -6 &amp; 7 &amp; 1\\\\<br \/>\n7 &amp; 10 &amp; -9 &amp; 8\\\\<br \/>\n3 &amp; 3 &amp; 5 &amp; 1\\\\<br \/>\n-10 &amp; 2 &amp; 3 &amp; 4<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<p>We write the augmented matrix:<\/p>\n<p>\\[<br \/>\n\\left(A^{(0)} \\mid B^{(0)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\n5 &amp; -6 &amp; 7 &amp; 1 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \\\\<br \/>\n7 &amp; 10 &amp; -9 &amp; 8 &amp; 0 &amp; 1 &amp; 0 &amp; 0 \\\\<br \/>\n3 &amp; 3 &amp; 5 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp; 0 \\\\<br \/>\n-10 &amp; 2 &amp; 3 &amp; 4 &amp; 0 &amp; 0 &amp; 0 &amp; 1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>At the first step, we make the pivot element in position \\( (1,1) \\) equal to \\( 1 \\) and eliminate the first column in the other rows:<\/p>\n<ul>\n<li>From the second row we subtract the first row multiplied by \\( 7 \\).<\/li>\n<li>From the third row we subtract the first row multiplied by \\( 3 \\).<\/li>\n<li>To the fourth row we add the first row multiplied by \\( 10 \\).<\/li>\n<\/ul>\n<p>After that we have:<\/p>\n<p>\\[<br \/>\n\\left(A^{(1)}\\mid B^{(1)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\n1.&amp;-1.2&amp;1.4&amp;0.2&amp;0.2&amp;0&amp;0&amp;0\\\\<br \/>\n0&amp;18.4&amp;-18.8&amp;6.6&amp;-1.4&amp;1&amp;0&amp;0\\\\<br \/>\n0&amp;6.6&amp;0.8&amp;0.4&amp;-0.6&amp;0&amp;1&amp;0\\\\<br \/>\n0&amp;-10&amp;17&amp;6&amp;2&amp;0&amp;0&amp;1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>Next we move to the second column: we normalize the pivot element in position \\( (2,2) \\) and zero out all other entries in that column:<\/p>\n<ul>\n<li>To the first row we add the second row multiplied by \\( 1.2 \\).<\/li>\n<li>From the third row we subtract the second row multiplied by \\( 6.6 \\).<\/li>\n<li>To the fourth row we add the second row multiplied by \\( 10 \\).<\/li>\n<\/ul>\n<p>We obtain:<\/p>\n<p>\\[<br \/>\n\\left(A^{(2)}\\mid B^{(2)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\n1&amp;0&amp;0.174&amp;0.63&amp;0.109&amp;0.065&amp;0&amp;0\\\\<br \/>\n0&amp;1&amp;-1.022&amp;0.359&amp;-0.076&amp;0.054&amp;0&amp;0\\\\<br \/>\n0&amp;0&amp;7.543&amp;-1.967&amp;-0.098&amp;-0.359&amp;1&amp;0\\\\<br \/>\n0&amp;0&amp;6.783&amp;9.587&amp;1.239&amp;0.543&amp;0&amp;1<br \/>\n\\end{array}<br \/>\n\\right).<br \/>\n\\]<\/p>\n<p>After similar transformations for the third and fourth columns, the left block becomes the identity matrix, and the right block becomes the desired inverse. In the end:<\/p>\n<p>\\[<br \/>\n\\left(A^{(4)}\\mid B^{(4)}\\right)=<br \/>\n\\left(<br \/>\n\\begin{array}{cccc|cccc}<br \/>\n1&amp;0&amp;0&amp;0&amp;0.032&amp;0.022&amp;0.030&amp;-0.060\\\\<br \/>\n0&amp;1&amp;0&amp;0&amp;-0.1&amp;-0.001&amp;0.143&amp;-0.008\\\\<br \/>\n0&amp;0&amp;1&amp;0&amp;0.018&amp;-0.028&amp;0.112&amp;0.023\\\\<br \/>\n0&amp;0&amp;0&amp;1&amp;0.117&amp;0.076&amp;-0.079&amp;0.088<br \/>\n\\end{array}<br \/>\n\\right),<br \/>\n\\]<\/p>\n<p>so<\/p>\n<p>\\[<br \/>\nA^{-1}\\approx<br \/>\n\\begin{pmatrix}<br \/>\n0.032 &amp; 0.022 &amp; 0.030 &amp; -0.060 \\\\<br \/>\n-0.100 &amp; -0.001 &amp; 0.143 &amp; -0.008 \\\\<br \/>\n0.018 &amp; -0.028 &amp; 0.112 &amp; 0.023 \\\\<br \/>\n0.117 &amp; 0.076 &amp; -0.079 &amp; 0.088<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<h3 class=\"example\">Example 3. Find the inverse of a matrix<\/h3>\n<p>\\[<br \/>\nA=<br \/>\n\\begin{pmatrix}<br \/>\n0 &amp; -1 &amp; 3 &amp; 0 &amp; 2 \\\\<br \/>\n2 &amp; -4 &amp; 1 &amp; 5 &amp; 3 \\\\<br \/>\n-4 &amp; 5 &amp; 7 &amp; -10 &amp; 0 \\\\<br \/>\n-2 &amp; 1 &amp; 8 &amp; -5 &amp; 3<br \/>\n\\end{pmatrix}.<br \/>\n\\]<\/p>\n<p>Here it is important to stop right away and check the dimensions. This matrix has \\( 4 \\) rows and \\( 5 \\) columns, so it is not square. But an inverse matrix is defined only for square matrices of size \\( n\\times n \\). Therefore, for this \\( A \\), the inverse matrix \\( A^{-1} \\) does not exist, and the Gauss\u2013Jordan method in its standard form cannot be applied here.<\/p>\n<h2>Where to Go Next: Topics That Will Strengthen Your Skills<\/h2>\n<p>If you enjoyed working with inverse matrices, it makes perfect sense to move on to related topics and expand your toolbox for solving problems. Where should you start so that it\u2019s genuinely useful? Below are three directions that naturally continue the same theme and help you see other approaches to finding the inverse matrix.<\/p>\n<ol>\n<li><a title=\"Inverse of a matrix via cofactors\" href=\"https:\/\/www.mathros.net.ua\/en\/inverse-of-a-matrix-by-adjoint-method.html\">Inverse of a Matrix Using Cofactors: The Logic of Minors and Determinants<\/a> \u2014 We\u2019ll look at the classical method based on minors and cofactors so you can clearly understand how the final answer is constructed.<\/li>\n<li><a title=\"Inverse of a matrix and the characteristic polynomial\" href=\"https:\/\/www.mathros.net.ua\/en\/\">Inverse of a Matrix and the Characteristic Polynomial: An Unusual but Powerful Approach<\/a> \u2014 We\u2019ll explain how the inverse is connected to the characteristic polynomial and show how this idea can be used in practice.<\/li>\n<li><a title=\"Inverse of a matrix by the bordering method\" href=\"https:\/\/www.mathros.net.ua\/en\/\">Inverse of a Matrix by the Bordering Method: How Adding Rows and Columns Leads to the Result<\/a> \u2014 We\u2019ll present the main idea of the bordering method and explain how the inverse matrix can be obtained through step-by-step expansion.<\/li>\n<\/ol>\n<h2>From Theory to Code: The Inverse Matrix in Your Program<\/h2>\n<p>If you\u2019re interested in programming, try turning this flowchart into a small program that finds an inverse matrix using the Gauss\u2013Jordan method. It\u2019s a genuinely useful exercise, because you immediately see how a mathematical algorithm behaves with real numbers during computation.<\/p>\n<p>Pick your favorite language\u2014<a title=\"What is Python\" href=\"https:\/\/www.mathros.net.ua\/en\/what-is-python.html\"><em>Python<\/em><\/a>, <em>PHP<\/em>, <em>JavaScript<\/em>, or <em>C++<\/em>\u2014and build a mini calculator: you enter a matrix, run the computation, and get \\( A^{-1} \\) as the output. And if you also print the intermediate matrices at each step, it becomes even more interesting to compare the result with manual calculations.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-2394 aligncenter\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/01\/inverse-of-a-matrix-using-gauss-jordan-method1.jpg\" alt=\"A flowchart of the algorithm that shows, step by step, how the inverse of a matrix is computed using the Gauss\u2013Jordan method\" width=\"600\" height=\"1617\" srcset=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/01\/inverse-of-a-matrix-using-gauss-jordan-method1.jpg 600w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/01\/inverse-of-a-matrix-using-gauss-jordan-method1-111x300.jpg 111w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/01\/inverse-of-a-matrix-using-gauss-jordan-method1-380x1024.jpg 380w, https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2026\/01\/inverse-of-a-matrix-using-gauss-jordan-method1-570x1536.jpg 570w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The inverse of a matrix is a tool that lets you \u201cundo\u201d multiplication by a matrix and recover the original<\/p>\n","protected":false},"author":1,"featured_media":2396,"comment_status":"open","ping_status":"closed","sticky":false,"template":"template-centered.php","format":"standard","meta":{"footnotes":""},"categories":[414],"tags":[445,444,440,439,417],"class_list":["post-2380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fundamentals-of-matrix-algebra","tag-gauss-jordan-elimination","tag-gauss-jordan-method","tag-inverse-matrix","tag-inverse-of-a-matrix","tag-linear-algebra"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/2380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/comments?post=2380"}],"version-history":[{"count":18,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/2380\/revisions"}],"predecessor-version":[{"id":2599,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/2380\/revisions\/2599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media\/2396"}],"wp:attachment":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media?parent=2380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/categories?post=2380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/tags?post=2380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}