System of linear equations calculator

x1

+

x1

+

x1

+

x1

+

x2

+

x2

+

x2

+

x2

+

x3

+

x3

+

x3

+

x3

+

x4

=

x4

=

x4

=

x4

=
Number format
Solution comments
Without description (answer only)

a

b

c

d

x

y

z

clear

i

ab
x2
xn

Randomize

313131313135151515151583137
2
2510
=Solve

  How to solve a system by the Montante (Bareiss) method

Apply Bareiss-style integer-preserving elimination to the augmented matrix. Each pivot operation divides exactly by the previous pivot, so intermediate values stay integers throughout. Read the solution from the final reduced form.

  Montante (Bareiss) worked example (6 equations)

Write the system of equations in matrix form:
4
1
0
1
0
0
1
5
1
0
1
0
0
1
4
1
0
1
1
0
1
5
1
0
0
1
0
1
4
1
0
0
1
0
1
3
6
8
7
8
7
5
To find the roots of a system of linear equations, using the
Montante (Bareiss algorithm)
method , we can transform the matrix form of the system so that the left part of the matrix becomes a identity, then on the right part we get the roots of the system;
2
Iteration 1
A0
=
4
1
0
1
0
0
1
5
1
0
1
0
0
1
4
1
0
1
1
0
1
5
1
0
0
1
0
1
4
1
0
0
1
0
1
3
6
8
7
8
7
5
In the first iteration, the previous pivot element is always equal to 1:
p0
=
1
;
The current pivot element is equal to the element of the previous matrix (
A0
) with indices
1
,
1
:
p1
=
a0
0
1,1
=
4
;
Calculate the next matrix (
A1
) based on the previous matrix (
A0
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
Write the initial matrix
A1
and mark the elements that we need to find as unknown:
A1
=
4
0
0
0
0
0
1
×××××
0
×××××
1
×××××
0
×××××
0
×××××
6
×××××
To find unknown elements use the following formula:
a1
0
i,j
=
a0
0
i,j
*
p1
-
a0
0
1,j
*
a0
0
i,1
p0
// where
p0
is the previous pivot element
p1
is the current pivot element
a0
is the element of the previous matrix, calculated on the previous iteration
a1
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {2, 3, 4, 5, 6} × {2, 3, 4, 5, 6, 7}
A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1,4
*
a0
0
6,1
p0
=
0
*
4
-
1
*
0
1
=
0
;
a1
0
6,5
=
a0
0
6,5
*
p1
-
a0
0
1,5
*
a0
0
6,1
p0
=
1
*
4
-
0
*
0
1
=
4
;
a1
0
6,6
=
a0
0
6,6
*
p1
-
a0
0
1,6
*
a0
0
6,1
p0
=
3
*
4
-
0
*
0
1
=
12
;
a1
0
6,7
=
a0
0
6,7
*
p1
-
a0
0
1,7
*
a0
0
6,1
p0
=
5
*
4
-
6
*
0
1
=
20
;
Hide description
3
Iteration 2
The current pivot element is equal to the element of the previous matrix (
A1
) with indices
2
,
2
:
p2
=
a1
0
2,2
=
19
;
Calculate the next matrix (
A2
) based on the previous matrix (
A1
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
3)
Replace all previous pivot elements with p2;
Write the initial matrix
A2
and mark the elements that we need to find as unknown:
A2
=
19
0
0
0
0
0
0
19
0
0
0
0
×
4
××××
×
-1
××××
×
4
××××
×
0
××××
×
26
××××
To find unknown elements use the following formula:
a2
0
i,j
=
a1
0
i,j
*
p2
-
a1
0
2,j
*
a1
0
i,2
p1
// where
p1
is the previous pivot element
p2
is the current pivot element
a1
is the element of the previous matrix, calculated on the previous iteration
a2
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {1, 3, 4, 5, 6} × {3, 4, 5, 6, 7}
A2
=
19
0
0
0
0
0
0
19
0
0
0
0
-1
4
72
20
-4
19
5
-1
20
90
20
0
-1
4
-4
20
72
19
0
0
19
0
19
57
22
26
107
130
107
95
a2
0
1,3
=
a1
0
1,3
*
p2
-
a1
0
2,3
*
a1
0
1,2
p1
=
0
*
19
-
4
*
1
4
=
-1
;
a2
0
1,4
=
a1
0
1,4
*
p2
-
a1
0
2,4
*
a1
0
1,2
p1
=
1
*
19
-
-1
*
1
4
=
5
;
a2
0
1,5
=
a1
0
1,5
*
p2
-
a1
0
2,5
*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
5,4
*
p2
-
a1
0
2,4
*
a1
0
5,2
p1
=
4
*
19
-
-1
*
4
4
=
20
;
a2
0
5,5
=
a1
0
5,5
*
p2
-
a1
0
2,5
*
a1
0
5,2
p1
=
16
*
19
-
4
*
4
4
=
72
;
a2
0
5,6
=
a1
0
5,6
*
p2
-
a1
0
2,6
*
a1
0
5,2
p1
=
4
*
19
-
0
*
4
4
=
19
;
a2
0
5,7
=
a1
0
5,7
*
p2
-
a1
0
2,7
*
a1
0
5,2
p1
=
28
*
19
-
26
*
4
4
=
107
;
a2
0
6,3
=
a1
0
6,3
*
p2
-
a1
0
2,3
*
a1
0
6,2
p1
=
4
*
19
-
4
*
0
4
=
19
;
a2
0
6,4
=
a1
0
6,4
*
p2
-
a1
0
2,4
*
a1
0
6,2
p1
=
0
*
19
-
-1
*
0
4
=
0
;
a2
0
6,5
=
a1
0
6,5
*
p2
-
a1
0
2,5
*
a1
0
6,2
p1
=
4
*
19
-
4
*
0
4
=
19
;
a2
0
6,6
=
a1
0
6,6
*
p2
-
a1
0
2,6
*
a1
0
6,2
p1
=
12
*
19
-
0
*
0
4
=
57
;
a2
0
6,7
=
a1
0
6,7
*
p2
-
a1
0
2,7
*
a1
0
6,2
p1
=
20
*
19
-
26
*
0
4
=
95
;
Hide description
4
Iteration 3
The current pivot element is equal to the element of the previous matrix (
A2
) with indices
3
,
3
:
p3
=
a2
0
3,3
=
72
;
Calculate the next matrix (
A3
) based on the previous matrix (
A2
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
3)
Replace all previous pivot elements with p3;
Write the initial matrix
A3
and mark the elements that we need to find as unknown:
A3
=
72
0
0
0
0
0
0
72
0
0
0
0
0
0
72
0
0
0
××
20
×××
××
-4
×××
××
19
×××
××
107
×××
To find unknown elements use the following formula:
a3
0
i,j
=
a2
0
i,j
*
p3
-
a2
0
3,j
*
a2
0
i,3
p2
// where
p2
is the previous pivot element
p3
is the current pivot element
a2
is the element of the previous matrix, calculated on the previous iteration
a3
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {1, 2, 4, 5, 6} × {4, 5, 6, 7}
A3
=
72
0
0
0
0
0
0
72
0
0
0
0
0
0
72
0
0
0
20
-8
20
320
80
-20
-4
16
-4
80
272
76
1
-4
19
-20
76
197
89
76
107
380
428
253
a3
0
1,4
=
a2
0
1,4
*
p3
-
a2
0
3,4
*
a2
0
1,3
p2
=
5
*
72
-
20
*
-1
19
=
20
;
a3
0
1,5
=
a2
0
1,5
*
p3
-
a2
0
3,5
*
a2
0
1,3
p2
=
-1
*
72
-
-4
*
-1
19
=
-4
;
a3
0
1,6
=
a2
0
1,6
*
p3
-
a2
0
3,6
*
a2
0
1,3
p2
=
0
*
72
-
19
*
-1
19
=
1
;
a3
0
1,7
=
a2
0
1,7
*
p3
-
a2
0
3,7
*
a2
0
1,3
p2
=
22
*
72
-
107
*
-1
19
=
89
;
a3
0
2,4
=
a2
0
2,4
*
p3
-
a2
0
3,4
*
a2
0
2,3
p2
=
-1
*
72
-
20
*
4
19
=
-8
;
a3
0
2,5
=
a2
0
2,5
*
p3
-
a2
0
3,5
*
a2
0
2,3
p2
=
4
*
72
-
-4
*
4
19
=
16
;
a3
0
2,6
=
a2
0
2,6
*
p3
-
a2
0
3,6
*
a2
0
2,3
p2
=
0
*
72
-
19
*
4
19
=
-4
;
a3
0
2,7
=
a2
0
2,7
*
p3
-
a2
0
3,7
*
a2
0
2,3
p2
=
26
*
72
-
107
*
4
19
=
76
;
a3
0
4,4
=
a2
0
4,4
*
p3
-
a2
0
3,4
*
a2
0
4,3
p2
=
90
*
72
-
20
*
20
19
=
320
;
a3
0
4,5
=
a2
0
4,5
*
p3
-
a2
0
3,5
*
a2
0
4,3
p2
=
20
*
72
-
-4
*
20
19
=
80
;
a3
0
4,6
=
a2
0
4,6
*
p3
-
a2
0
3,6
*
a2
0
4,3
p2
=
0
*
72
-
19
*
20
19
=
-20
;
a3
0
4,7
=
a2
0
4,7
*
p3
-
a2
0
3,7
*
a2
0
4,3
p2
=
130
*
72
-
107
*
20
19
=
380
;
a3
0
5,4
=
a2
0
5,4
*
p3
-
a2
0
3,4
*
a2
0
5,3
p2
=
20
*
72
-
20
*
-4
19
=
80
;
a3
0
5,5
=
a2
0
5,5
*
p3
-
a2
0
3,5
*
a2
0
5,3
p2
=
72
*
72
-
-4
*
-4
19
=
272
;
a3
0
5,6
=
a2
0
5,6
*
p3
-
a2
0
3,6
*
a2
0
5,3
p2
=
19
*
72
-
19
*
-4
19
=
76
;
a3
0
5,7
=
a2
0
5,7
*
p3
-
a2
0
3,7
*
a2
0
5,3
p2
=
107
*
72
-
107
*
-4
19
=
428
;
a3
0
6,4
=
a2
0
6,4
*
p3
-
a2
0
3,4
*
a2
0
6,3
p2
=
0
*
72
-
20
*
19
19
=
-20
;
a3
0
6,5
=
a2
0
6,5
*
p3
-
a2
0
3,5
*
a2
0
6,3
p2
=
19
*
72
-
-4
*
19
19
=
76
;
a3
0
6,6
=
a2
0
6,6
*
p3
-
a2
0
3,6
*
a2
0
6,3
p2
=
57
*
72
-
19
*
19
19
=
197
;
a3
0
6,7
=
a2
0
6,7
*
p3
-
a2
0
3,7
*
a2
0
6,3
p2
=
95
*
72
-
107
*
19
19
=
253
;
Hide description
5
Iteration 4
The current pivot element is equal to the element of the previous matrix (
A3
) with indices
4
,
4
:
p4
=
a3
0
4,4
=
320
;
Calculate the next matrix (
A4
) based on the previous matrix (
A3
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
3)
Replace all previous pivot elements with p4;
Write the initial matrix
A4
and mark the elements that we need to find as unknown:
A4
=
320
0
0
0
0
0
0
320
0
0
0
0
0
0
320
0
0
0
0
0
0
320
0
0
×××
80
××
×××
-20
××
×××
380
××
To find unknown elements use the following formula:
a4
0
i,j
=
a3
0
i,j
*
p4
-
a3
0
4,j
*
a3
0
i,4
p3
// where
p3
is the previous pivot element
p4
is the current pivot element
a3
is the element of the previous matrix, calculated on the previous iteration
a4
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {1, 2, 3, 5, 6} × {5, 6, 7}
A4
=
320
0
0
0
0
0
0
320
0
0
0
0
0
0
320
0
0
0
0
0
0
320
0
0
-40
80
-40
80
1120
360
10
-20
90
-20
360
870
290
380
370
380
1480
1230
a4
0
1,5
=
a3
0
1,5
*
p4
-
a3
0
4,5
*
a3
0
1,4
p3
=
-4
*
320
-
80
*
20
72
=
-40
;
a4
0
1,6
=
a3
0
1,6
*
p4
-
a3
0
4,6
*
a3
0
1,4
p3
=
1
*
320
-
-20
*
20
72
=
10
;
a4
0
1,7
=
a3
0
1,7
*
p4
-
a3
0
4,7
*
a3
0
1,4
p3
=
89
*
320
-
380
*
20
72
=
290
;
a4
0
2,5
=
a3
0
2,5
*
p4
-
a3
0
4,5
*
a3
0
2,4
p3
=
16
*
320
-
80
*
-8
72
=
80
;
a4
0
2,6
=
a3
0
2,6
*
p4
-
a3
0
4,6
*
a3
0
2,4
p3
=
-4
*
320
-
-20
*
-8
72
=
-20
;
a4
0
2,7
=
a3
0
2,7
*
p4
-
a3
0
4,7
*
a3
0
2,4
p3
=
76
*
320
-
380
*
-8
72
=
380
;
a4
0
3,5
=
a3
0
3,5
*
p4
-
a3
0
4,5
*
a3
0
3,4
p3
=
-4
*
320
-
80
*
20
72
=
-40
;
a4
0
3,6
=
a3
0
3,6
*
p4
-
a3
0
4,6
*
a3
0
3,4
p3
=
19
*
320
-
-20
*
20
72
=
90
;
a4
0
3,7
=
a3
0
3,7
*
p4
-
a3
0
4,7
*
a3
0
3,4
p3
=
107
*
320
-
380
*
20
72
=
370
;
a4
0
5,5
=
a3
0
5,5
*
p4
-
a3
0
4,5
*
a3
0
5,4
p3
=
272
*
320
-
80
*
80
72
=
1120
;
a4
0
5,6
=
a3
0
5,6
*
p4
-
a3
0
4,6
*
a3
0
5,4
p3
=
76
*
320
-
-20
*
80
72
=
360
;
a4
0
5,7
=
a3
0
5,7
*
p4
-
a3
0
4,7
*
a3
0
5,4
p3
=
428
*
320
-
380
*
80
72
=
1480
;
a4
0
6,5
=
a3
0
6,5
*
p4
-
a3
0
4,5
*
a3
0
6,4
p3
=
76
*
320
-
80
*
-20
72
=
360
;
a4
0
6,6
=
a3
0
6,6
*
p4
-
a3
0
4,6
*
a3
0
6,4
p3
=
197
*
320
-
-20
*
-20
72
=
870
;
a4
0
6,7
=
a3
0
6,7
*
p4
-
a3
0
4,7
*
a3
0
6,4
p3
=
253
*
320
-
380
*
-20
72
=
1230
;
Hide description
6
Iteration 5
The current pivot element is equal to the element of the previous matrix (
A4
) with indices
5
,
5
:
p5
=
a4
0
5,5
=
1120
;
Calculate the next matrix (
A5
) based on the previous matrix (
A4
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
3)
Replace all previous pivot elements with p5;
Write the initial matrix
A5
and mark the elements that we need to find as unknown:
A5
=
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
××××
360
×
××××
1480
×
To find unknown elements use the following formula:
a5
0
i,j
=
a4
0
i,j
*
p5
-
a4
0
5,j
*
a4
0
i,5
p4
// where
p4
is the previous pivot element
p5
is the current pivot element
a4
is the element of the previous matrix, calculated on the previous iteration
a5
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {1, 2, 3, 4, 6} × {6, 7}
A5
=
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
0
0
0
0
0
1120
0
80
-160
360
-160
360
2640
1200
960
1480
960
1480
2640
a5
0
1,6
=
a4
0
1,6
*
p5
-
a4
0
5,6
*
a4
0
1,5
p4
=
10
*
1120
-
360
*
-40
320
=
80
;
a5
0
1,7
=
a4
0
1,7
*
p5
-
a4
0
5,7
*
a4
0
1,5
p4
=
290
*
1120
-
1480
*
-40
320
=
1200
;
a5
0
2,6
=
a4
0
2,6
*
p5
-
a4
0
5,6
*
a4
0
2,5
p4
=
-20
*
1120
-
360
*
80
320
=
-160
;
a5
0
2,7
=
a4
0
2,7
*
p5
-
a4
0
5,7
*
a4
0
2,5
p4
=
380
*
1120
-
1480
*
80
320
=
960
;
a5
0
3,6
=
a4
0
3,6
*
p5
-
a4
0
5,6
*
a4
0
3,5
p4
=
90
*
1120
-
360
*
-40
320
=
360
;
a5
0
3,7
=
a4
0
3,7
*
p5
-
a4
0
5,7
*
a4
0
3,5
p4
=
370
*
1120
-
1480
*
-40
320
=
1480
;
a5
0
4,6
=
a4
0
4,6
*
p5
-
a4
0
5,6
*
a4
0
4,5
p4
=
-20
*
1120
-
360
*
80
320
=
-160
;
a5
0
4,7
=
a4
0
4,7
*
p5
-
a4
0
5,7
*
a4
0
4,5
p4
=
380
*
1120
-
1480
*
80
320
=
960
;
a5
0
6,6
=
a4
0
6,6
*
p5
-
a4
0
5,6
*
a4
0
6,5
p4
=
870
*
1120
-
360
*
360
320
=
2640
;
a5
0
6,7
=
a4
0
6,7
*
p5
-
a4
0
5,7
*
a4
0
6,5
p4
=
1230
*
1120
-
1480
*
360
320
=
2640
;
Hide description
7
Iteration 6
The current pivot element is equal to the element of the previous matrix (
A5
) with indices
6
,
6
:
p6
=
a5
0
6,6
=
2640
;
Calculate the next matrix (
A6
) based on the previous matrix (
A5
);
1)
The line in which there is a pivot element is rewritten in the next matrix without changes;
2)
Write zero in all elements of the column in which the pivot element is located, except for the pivot element itself;
3)
Replace all previous pivot elements with p6;
Write the initial matrix
A6
and mark the elements that we need to find as unknown:
A6
=
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
×××××
2640
To find unknown elements use the following formula:
a6
0
i,j
=
a5
0
i,j
*
p6
-
a5
0
6,j
*
a5
0
i,6
p5
// where
p5
is the previous pivot element
p6
is the current pivot element
a5
is the element of the previous matrix, calculated on the previous iteration
a6
is the element of the next matrix, calculated on the current iteration
i
is the row number
j
is the column number
Ɐ(
i, j
)
∈ {1, 2, 3, 4, 5} × {7}
A6
=
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
0
0
0
0
0
0
2640
2640
2640
2640
2640
2640
2640
a6
0
1,7
=
a5
0
1,7
*
p6
-
a5
0
6,7
*
a5
0
1,6
p5
=
1200
*
2640
-
2640
*
80
1120
=
2640
;
a6
0
2,7
=
a5
0
2,7
*
p6
-
a5
0
6,7
*
a5
0
2,6
p5
=
960
*
2640
-
2640
*
-160
1120
=
2640
;
a6
0
3,7
=
a5
0
3,7
*
p6
-
a5
0
6,7
*
a5
0
3,6
p5
=
1480
*
2640
-
2640
*
360
1120
=
2640
;
a6
0
4,7
=
a5
0
4,7
*
p6
-
a5
0
6,7
*
a5
0
4,6
p5
=
960
*
2640
-
2640
*
-160
1120
=
2640
;
a6
0
5,7
=
a5
0
5,7
*
p6
-
a5
0
6,7
*
a5
0
5,6
p5
=
1480
*
2640
-
2640
*
360
1120
=
2640
;
Hide description
8
System of linear equations
Divide each nonzero element of the matrix by
2640
;
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
1
1
a
0
1,1
=
2640
2640
=
1
;
a
0
1,7
=
2640
2640
=
1
;
a
0
2,2
=
2640
2640
=
1
;
a
0
2,7
=
2640
2640
=
1
;
a
0
3,3
=
2640
2640
=
1
;
a
0
3,7
=
2640
2640
=
1
;
a
0
4,4
=
2640
2640
=
1
;
a
0
4,7
=
2640
2640
=
1
;
a
0
5,5
=
2640
2640
=
1
;
a
0
5,7
=
2640
2640
=
1
;
a
0
6,6
=
2640
2640
=
1
;
a
0
6,7
=
2640
2640
=
1
;
Hide description
Answer
Ax = b
x
0
1
=
1
;
x
0
2
=
1
;
x
0
3
=
1
;
x
0
4
=
1
;
x
0
5
=
1
;
x
0
6
=
1
;
SIZE6×7METHODMontante (Bareiss algorithm)

  Calculation methods

  Sources