Linear Equations Solver

See Also: Nonlinear Equations Solver  Differential Equations Solver


Overview

The purpose of this program is to allow you to solve systems of linear algebraic equations where the set of linear equations is inputted in a matrix-vector form. The elements of the matrix of coefficients and the vector of constants must be entered. 

The data entry screen is shown below. The matrix of coefficients and the vector of coefficients are displayed. Each equation (row) is indicated by a number, and each column by a variable name (x1, x2, ..., x5, beta). 

You can use the cursor to highlight one of the cells. This is the current cell. You can move the highlight by using the arrow keys or the left mouse click. To enter or modify a value in a data cell, move the highlight to the appropriate cell and either start typing in a number or erase and re-type the value already in the cell. Column (variable) names can be changed by selecting a column or a cell and then choosing the "Variable name..." option from the "Edit" dropdown menu or from the menu activated with the right mouse click. 

After you have finished entering the data, the system of equations can be solved by selecting “Solve” from the dropdown “Program” menu or by bringing the cursor to the pink arrow on the screen and pressing the left mouse button.

Example

Consider the following system of linear equations:

0.07 D1 + 0.18 B1 + 0.15 D2 + 0.24 B2 = 10.5
0.04 D1 + 0.24 B1 + 0.10 D2 + 0.65 B2 = 17.5
0.54 D1 + 0.42 B1 + 0.54 D2 + 0.10 B2 = 28
0.35 D1 + 0.16 B1 + 0.21 D2 + 0.01 B2 = 14

This system of equations is defined by first entering "5" in the Number of equations box and pressing Enter.

The coefficients from the left hand side of the equation should be entered into the matrix of coefficients, the constants in the right hand side of the equations into the beta vector and the column names must be changed to D1, B1, D2 and B2 respectively, as shown below:


 

Pressing the pink arrow solves the problem, and the following solution is obtained in the “Report” window.

Solution Report

POLYMATH Report

No Title

Linear Equations

 

Linear Equations Solution

  Variable Value
1 D1 26.25
2 B1 17.5
3 D2 8.75
4 B2 17.5

The equations

[1] 0.07·D1 + 0.18·B1 + 0.15·D2 + 0.24·B2 = 10.5
[2] 0.04·D1 + 0.24·B1 + 0.1·D2 + 0.65·B2 = 17.5
[3] 0.54·D1 + 0.42·B1 + 0.54·D2 + 0.1·B2 = 28
[4] 0.35·D1 + 0.16·B1 + 0.21·D2 + 0.01·B2 = 14

Coefficients matrix and beta vector

  D1 B1 D2 B2 beta
1 0.07 0.18 0.15 0.24 10.5
2 0.04 0.24 0.1 0.65 17.5
3 0.54 0.42 0.54 0.1 28.
4 0.35 0.16 0.21 0.01 14.

General
Number of equations: 4