Mathematics
Exact rational linear systems up to four unknowns
Solve A·x=b exactly, distinguish unique, infinite and inconsistent systems, and verify the particular solution and nullspace basis.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. JSON, HTML and TXT downloads keep your inputs and all result rows, with exact values where available. Automatic recalculation after editing is off unless you switch it on. Nothing is saved, imported or sent automatically. To obtain y = m*x + c through two points with different x coordinates, enter A as x0;1|x1;1 and b as y0|y1. The first solution component is m, the slope; the second is c, the intercept. For example A = 1;1|3;1 and b = 3|7 gives 2;1, so y = 2*x + 1. This uses the existing exact rational solver and its input bounds. If the x coordinates are equal, this y = m*x + c construction is not available: two different y coordinates describe a vertical line x = x0, while two identical points do not determine one unique line. Do not interpret a dependent or inconsistent coefficient system as an ordinary slope. For a general implicit line through two distinct points, including a vertical line, use A = x0;y0;1|x1;y1;1 and b = 0|0. Read the single displayed nullspace basis vector (u;v;w) as u*x + v*y + w = 0. Use the basis, not the zero particular solution. Nonzero multiples describe the same line. Repeated identical points leave two free coefficients and do not determine one unique line. For A = 1;3;1|3;7;1 the basis is 2;-1;1, giving 2*x-y+1=0. For A = 2;1;1|2;4;1 a basis is -1/2;0;1, giving x=2. All existing matrix bounds still apply.
Result
Formula / calculation:
Rational entries (decimal point/comma, fraction or scientific notation), each input≤400 characters and at most 4 rows/4 columns. Semicolon separates columns; | separates rows. Exact fractions; decimal display rounded 0–12 places. Each result row, including row-operation log,≤500 characters; larger expanded results refuse. b must be one column with the same row count as A. Infinite solution set uses arbitrary real coefficients of the displayed nullspace basis. No quadratic/nonlinear/general-equation parser.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Exact rational entries, semicolon columns and vertical-bar rows; matrix arithmetic and exact Gauss–Jordan elimination. Rational entries (decimal point/comma, fraction or scientific notation), each input≤400 characters and at most 4 rows/4 columns. Semicolon separates columns; | separates rows. Exact fractions; decimal display rounded 0–12 places. Each result row, including row-operation log,≤500 characters; larger expanded results refuse. b must be one column with the same row count as A. Infinite solution set uses arbitrary real coefficients of the displayed nullspace basis. No quadratic/nonlinear/general-equation parser. For a null space calculation, enter your matrix in Matrix A and a zero column of the same row count in Right-hand column b, then choose Calculate. For example, A=1;2|2;4 and b=0|0 returns the basis vector (-2, 1). Read Nullspace basis vectors (exact) and A·basis checks (must be zero); each basis check must be zero. A zero-dimensional null space contains only the zero vector and has an empty basis. The original JSON, HTML and TXT records and current or saved scenario CSV/TXT retain the basis and checks. The separate Own freelance cost and billable time worksheet uses your known GBP costs, target pre-tax profit and billable hours or days for one stated period. Enter your own period and basis, reference and confirmation. It returns an exact hourly or day rate using the existing exact linear-system calculation. A two-decimal preview may be below the exact required rate, including 0.00; it is not a minimum rate. A billable day has your stated meaning, with no automatic hours per day or weeks per year. This worksheet does not calculate tax, National Insurance, pensions, leave, IR35 or take-home salary. Current and explicitly saved JSON, HTML and TXT files keep all your inputs and the whole calculation record.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Matrix A:
- 2;1|1;-1
- Right-hand column b: | separates rows
- 5|1
Result
- Dimensions of A
- 2×2
- A (exact)
- 2; 1 | 1; -1
- B / b (exact)
- 5 | 1
- Solution type
- One solution
- Coefficient / matrix rank
- 2
- Augmented rank
- 2
- Reduced row echelon form (exact)
- 1; 0; 2 | 0; 1; 1
- Exact row operations (one-based)
- R1 / 2 | R2 - (1) R1 | R2 / -3/2 | R1 - (1/2) R2
- Particular solution (exact)
- 2; 1
- Particular solution (rounded)
- 2.00; 1.00
- A·particular (must equal b)
- 5 | 1
- Free variable positions
- -
Frequently asked questions
How do I solve a system of linear equations exactly?
Enter the coefficient matrix A and the right-hand column b, then calculate. The editable example is A = 2;1|1;-1 with b = 5|1. Results are exact fractions, up to 4 rows and 4 columns.
What solution types does the tool distinguish?
It distinguishes unique, infinitely many and inconsistent systems, and verifies the particular solution and nullspace basis.
How do I find a line through two points?
Enter A as x0;1|x1;1 and b as y0|y1. The first solution is the slope m and the second the intercept c. A = 1;1|3;1 and b = 3|7 gives y = 2*x + 1.
What if the two points have equal x coordinates?
Then y = m*x + c is not available. Use A = x0;y0;1|x1;y1;1 and b = 0|0 and read the nullspace basis (u;v;w) as u*x + v*y + w = 0.
How do I find a null space?
Enter your matrix in A and a zero column of the same row count in b. For A = 1;2|2;4 and b = 0|0 the basis vector is (-2, 1). A zero-dimensional null space has an empty basis.
Can it compare two straight lines?
Yes. It compares A1*x + B1*y = C1 and A2*x + B2*y = C2 and reports one solution (intersecting), infinitely many (same line) or no solution (distinct parallel lines).
Can it calculate a freelance hourly or day rate?
A separate worksheet uses your known GBP costs, target pre-tax profit and billable hours or days for one period. It does not calculate tax, National Insurance, pensions, leave or IR35.