Homogeneous linear system 2x2 calculator
Enter the four coefficients of two equations with zero on the right and get the full solution set: with 1, 2, 3 and 4 the determinant is −2, so only x and y both zero work. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 1
- B
- 2
- C
- 3
- D
- 4
- Determinant
- -2
- Solution type
- trivial
When the equations are dependent, the result includes a direction vector and a parameterized expression for x and y. When every coefficient is zero, it correctly returns the full two-parameter plane instead of losing solutions.
Enter the two homogeneous equations
The right-hand sides do not need input fields because a homogeneous system always has zero on both right-hand sides. Every coefficient is required, including a coefficient that equals zero, because omitting a value is different from stating that its term is absent. Inputs must be finite JavaScript numbers; numeric text, NaN, Infinity, arrays, and objects are rejected so that the result never depends on implicit coercion.
Coefficient magnitudes are capped at 1e150, which keeps every multiplication used by the determinant inside the finite range of standard double-precision arithmetic. Once the four coefficients pass validation, the calculator evaluates the coefficient matrix and returns one complete description of its solution set. The response does not introduce a constant term or solve a nonhomogeneous system.
If your equations have nonzero values on the right, use a general linear-system solver instead, since the determinant test described here answers a different question about a nullspace.
Understand the determinant test and the returned family
The coefficient matrix is [[a,b],[c,d]], and its determinant is ad − bc. A nonzero determinant means the matrix is invertible. If the determinant is exactly zero, the rows are dependent and the nullspace contains nonzero vectors.
For a nonzero first row, the calculator uses the direction vector (−b,a), because a(−b) + b(a) equals zero. Every solution is therefore (x,y) = t(−b,a), where t may be any real number. If the first row is zero but the second is not, it applies the same construction to that row and uses (−d,c).
The response includes the parameter name, symbolic expressions, and the numeric direction vector, making the family convenient both for reading and for downstream code. The special all-zero matrix has rank zero rather than rank one: both equations reduce to 0 = 0, so x and y vary independently. In that case the calculator returns x = s and y = t with the standard two-vector basis.
This distinction preserves the complete solution set instead of showing only one line within the plane.
Use the result confidently in study and automation
The result is designed to make the classification easy to verify. For a one-parameter result, multiply the returned direction by any real t and substitute the two components. Each equation cancels to zero.
For the all-zero case, choose s and t independently because neither equation imposes a constraint. Exact zero is used for the determinant decision: the calculator does not silently treat a merely small nonzero determinant as singular. The algorithm uses no network, randomness, current time, or hidden state, so identical inputs always yield identical output.
What you can do with it
Check a linear algebra exercise
Confirm whether a two-equation homogeneous system has only the origin or infinitely many solutions, then compare the returned parameterization with hand work.
Find a 2x2 nullspace basis
Turn a singular coefficient matrix into a direction vector that spans its one-dimensional nullspace, including the rank-zero exception.
FAQ
When are there nontrivial solutions?
Nontrivial solutions exist exactly when ad − bc equals zero. Then the coefficient matrix is singular and its nullspace contains vectors other than the origin.
What does the parameter t mean?
It may be any real number. Varying t scales the returned direction vector and generates every solution of a rank-one homogeneous system.
What happens when a, b, c, and d are all zero?
Both equations impose no restriction. The response uses two independent parameters, x = s and y = t, and returns the standard basis of the full plane.
Does a very small determinant count as zero?
No. Classification uses exact equality on the computed number. For noisy measured data, use a numerical rank method with a scale-aware tolerance.
Why is there no box for the right-hand side?
In a homogeneous system both right-hand sides are always zero, so only the four coefficients are needed. If your equations have other values on the right, use a general linear system solver.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/homogeneous-system-2x2 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":2,"b":4,"c":1,"d":2}'const res = await fetch("https://api.kit.forhosting.com/algebra/homogeneous-system-2x2", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 2,
"b": 4,
"c": 1,
"d": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/homogeneous-system-2x2",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 2,
"b": 4,
"c": 1,
"d": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/homogeneous-system-2x2", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":2,"b":4,"c":1,"d":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":2,"b":4,"c":1,"d":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/homogeneous-system-2x2", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 2,
"b": 4,
"c": 1,
"d": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.homogeneous_system_2x2",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This homogeneous linear system calculator solves two equations of the form ax + by = 0 and cx + dy = 0. It computes the determinant ad − bc and uses it to decide whether the origin is the only solution or whether infinitely many solutions form a parametric family. The calculation is deterministic, runs without external services, and gives the same structured result in the browser and through the API.
Enter the two homogeneous equations
Write the system as ax + by = 0 and cx + dy = 0, then enter the four real coefficients a, b, c, and d. For example, 2x + 4y = 0 and x + 2y = 0 correspond to a = 2, b = 4, c = 1, and d = 2.
Understand the determinant test and the returned family
The only vector that an invertible matrix sends to the zero vector is the zero vector itself, so the response reports solution_type as trivial and gives x = 0 and y = 0.
Use the result confidently in study and automation
Read determinant first, then solution_type. For a trivial result, substitute x = 0 and y = 0 into both original equations; both sides are zero automatically, and invertibility proves that no other pair works. Setting t = 0 recovers the trivial solution, while any nonzero t produces a nontrivial solution. You can explore it free in the browser or submit an API item for $0.002; malformed input returns invalid_input rather than an invented family.
Integration use cases
Generate deterministic answer keys
Classify batches of small homogeneous systems with stable structured output suitable for worksheets, tests, and automated grading fixtures.
Technical questions
Why does a homogeneous system always have the trivial solution?
Substituting x = 0 and y = 0 makes both left-hand sides zero, matching the zero right-hand sides regardless of the coefficients.