Octave Basics: Solving Systems of Linear Equations

Goal: Solve a system of Linear Equations

The OS used in this tutorial is Manjaro linux, This tutorial uses terminal and should work on ALL operating systems.

To open up Octave, open up your terminal and type 'octave'. This prompts you with a screen of credits, followed by 'octave:1>'

Let's compose a three dimensional matrix equation, which we will call 'A'

A would be written as so like so: A typical 3x3 matrix

In terminal, we can write this as A = [3, 2, 4; 2, 0, 2; 4, 2, 3]

If we type 'A' in terminal, the matrix we inputted should be displayed see image be below:

matrix A written in Octave CLI

Now we have matrix 'A' in the memory of our terminal session

We will now establish matrix 'b', which is a 3x1 matrix. A typical 3x1 Matrix

Establish matrix 'b' using the same syntax we did with 'A', and recall the matrxi

matrix b and A written in Octave CLI

We will now compute unknown variables x1, x2, and x3. A written representation is in the picture below An example of a system of Linear Equation

We can compute the unknown variables by recalling the two matrices we've composed The three unknown variables are solved


We have solved all Unknown variables. We have: