LINSOLVE Function (Gnumeric)
Solve square linear systems in Gnumeric with LINSOLVE, multiple right-hand sides, array dimensions and residual checks.
Verification status: Gnumeric 1.12.57 ssconvert: specified LINSOLVE fixtures and separately captured worked-example GUI. Gnumeric 1.12.62 source inspected separately. How formula examples are checked
LINSOLVE solves a system of simultaneous linear equations A×X = B and returns X. A contains the coefficients of the unknowns; B contains the right-hand sides. Unlike a general optimization solver, this function solves a square linear system and does not choose an objective, impose inequalities or fit a regression automatically.
Syntax, dimensions and array entry
=LINSOLVE(A,B)
Both matrices are required. There are no optional arguments or defaults. A must be a nonempty n×n numeric matrix. B must have n rows and at least one column. The result has n rows and the same number of columns as B. Each column of B represents a separate right-hand side solved against the same A.
Select the entire output range in Gnumeric, type the formula and confirm with Ctrl+Shift+Enter to enter an array formula. Do not add braces manually. Use numeric coefficient ranges without headings. A missing coefficient should be supplied intentionally as numeric zero only if zero is actually part of the model.
Worked example: two simultaneous equations
Suppose 2x+y = 5 and x+3y = 10. Enter:
| Row | A | B | C |
|---|---|---|---|
| 1 | 2 | 1 | 5 |
| 2 | 1 | 3 | 10 |
Here A1:B2 is the coefficient matrix and C1:C2 is the right-hand side. Select D1:D2 and array-enter =LINSOLVE(A1:B2,C1:C2). The expected result is 1 in D1 and 3 in D2: x = 1 and y = 3.
An independent substitution verifies both rows: 2×1+3 = 5, and 1+3×3 = 10. In F1 enter =A1*$D$1+B1*$D$2-C1 and copy to F2. Both residuals should be zero, apart from floating-point rounding on more complicated inputs. Residual checks test whether the returned values solve the entered system; they cannot establish that you entered the intended real-world equations.
Advanced use: several right-hand sides
For a separate example, keep A1:B2 unchanged and put 5, 10 in C1:C2 and 1, 3 in D1:D2. Select F1:G2 and array-enter =LINSOLVE(A1:B2,C1:D2). The expected result is:
| F | G | |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 3 | 1 |
The first output column solves the original system. The second solves A×[0;1] = [1;3]. This is useful for comparing several scenarios that share the same coefficients. Put the whole right-hand-side matrix into one call rather than constructing a different coefficient matrix for every scenario.
When the goal is only to solve A×X = B, LINSOLVE expresses that directly. It avoids asking the worksheet to display a full inverse first. An inverse-based calculation can still provide a cross-check for small well-conditioned systems, but neither approach rescues a singular system.
Errors and numerical troubleshooting
- Nonsquare A, an empty matrix or a B whose row count differs from A produces
#VALUE!in the examined implementation. A 1×n row vector is not an n×1 right-hand-side column. - A singular coefficient matrix has no unique solution. For example, rows [1,2] and [2,4] are dependent. Do not replace an error by zero or treat one arbitrary solution as uniquely determined.
- The retained help labels a singular result
#VALUE!, while the actual callback uses#NUM!when the numerical solver reports an unacceptable status. The source conflict is disclosed rather than generalized into an all-version error guarantee. - Near-singular systems may produce large changes in X from small changes in A or B. A small residual alone does not guarantee accurate coefficients. Preserve input precision and inspect whether the equations are almost redundant.
- If only the first number appears, check the array-entry range. It should match B’s shape.
- When copying a residual formula, lock references to the solution vector while leaving the equation-row references relative, as in the worked example.
Version and verification scope
Official NEWS and the 1.12.1 release announcement identify LINSOLVE as added in Gnumeric 1.12.1. Implementation details here were inspected in retained 1.12.62 source. No last functioning release or retirement date has been established. Exact algebra independently verifies the examples; any native calculation is identified separately below.
Related functions
Official sources
Native evidence note
On 17 October 2026, Gnumeric 1.12.57 recalculated a synthetic workbook through ssconvert in the C.UTF-8 locale. The 2 recorded LINSOLVE fixture cases matched the independently computed numerical results or the source-predicted error cases within floating-point precision. The cases covered the 2×1 solution and a singular 2×2 coefficient matrix returning #NUM!. The two-right-hand-side example is independently checked algebra, not a separate recorded native run. These records are engine tests; the separately captured worked-example screenshot is scoped below. It does not certify other versions, locales, workbook formats or untested edge cases.
Native application screenshot

Gnumeric 1.12.57, captured 17 October 2026. Coefficients A1:B2; RHS C1:C2; solution D1:D2. The selected cell D1 shows the formula in the formula bar. Display precision is shorter than the independent reference values; integer cells may show a trailing decimal point. GUI locale was not independently recorded.