How to resolve the algorithm Gauss-Jordan matrix inversion step by step in the J programming language

Published on 12 May 2024 09:40 PM
#J

How to resolve the algorithm Gauss-Jordan matrix inversion step by step in the J programming language

Table of Contents

Problem Statement

Invert matrix   A   using Gauss-Jordan method. A   being an   n × n   matrix.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Gauss-Jordan matrix inversion step by step in the J programming language

Source code in the j programming language

require 'math/misc/linear'
augmentR_I1=: ,. e.@i.@#       NB. augment matrix on the right with its Identity matrix
matrix_invGJ=: # }."1 [: gauss_jordan@augmentR_I1


   ]A =: 1 2 3, 4 1 6,: 7 8 9
1 2 3
4 1 6
7 8 9
   matrix_invGJ A
 _0.8125 0.125    0.1875
   0.125 _0.25     0.125
0.520833 0.125 _0.145833


  

You may also check:How to resolve the algorithm Stack step by step in the Ioke programming language
You may also check:How to resolve the algorithm Visualize a tree step by step in the zkl programming language
You may also check:How to resolve the algorithm Undefined values step by step in the Mathematica/Wolfram Language programming language
You may also check:How to resolve the algorithm String case step by step in the SNOBOL4 programming language
You may also check:How to resolve the algorithm Call a foreign-language function step by step in the Fortran programming language