Reduced row echelon form calculator
Row-reduce a matrix all the way: a 3 × 4 system becomes three pivots equal to 1, zeros above and below each one, and a last column of -8, 1 and -2, with rank 3. Works up to 50 rows and 50 columns. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
This reduced row echelon form calculator turns a real m by n matrix into its unique reduced row echelon form using Gauss-Jordan elimination with partial pivoting, and reports every pivot position along with the matrix rank. RREF is the standard end product of full row reduction in linear algebra courses: each leading entry is one, each pivot column has zeros above and below that one, and nonzero rows form a clean staircase from left to right. Students use it to solve linear systems, read free versus bound variables, and check that two augmented matrices describe the same solution set. The engine is fully deterministic: finite floating-point arithmetic only, no network calls, no random sampling, and no date-dependent shortcuts. Classic checks include the three-by-four textbook matrix with rows one two negative one negative four, two three negative one negative eleven, and negative two zero negative three twenty-two, which reduces to a full-rank RREF with three unit pivots, and simple identity blocks that are already in RREF.
Where RREF fits in study, science, and software
Students meet reduced row echelon form when a linear algebra course moves from elementary row operations to solution sets, when a contest problem asks for the rank and free variables of a small integer matrix, or when they check that two different coefficient matrices reduce to the same RREF before trusting a hand calculation. Teachers can pre-generate answer keys for modest m and n without trusting opaque calculator apps that silently drop pivots, reorder columns inconsistently, or hide which positions were pivots.
Developers call the same contract from scripts to seed deterministic test vectors for solvers, to normalize user-entered augmented systems before tutoring demos, or to satisfy programming-challenge statements that demand RREF and pivot positions rather than a hand-waved sketch. Engineering and data practice often needs a fast, offline row reduction of a small dense system so dependency structure and rank can be checked without a full CAS under time pressure.
Product and education tools use RREF when a learner types a matrix and the UI must show the reduced form beside the pivot list and rank.
What you can do with it
Homework and RREF checks
Reduce textbook m×n matrices by Gauss-Jordan, verify unit pivots and zero pivot columns, and match rank before exams.
Tutoring and linear-system UIs
Normalize user-entered coefficient or augmented matrices into RREF so free versus bound variables are obvious.
FAQ
What does the reduced row echelon form calculator cost?
It is free in your browser on this page.
What is RREF and how does it differ from REF?
Both have a staircase of leading ones, but RREF also forces zeros above each pivot (not only below). This tool always returns full reduced row echelon form via Gauss-Jordan elimination.
What happens if a row has the wrong number of entries?
Every row must have the same length as the first row; ragged matrices are not accepted.
Does the matrix have to be square?
No. Any m×n rectangular matrix is allowed within the documented row and column limits. Augmented systems are common inputs.
How are the pivot positions and the rank shown?
Each pivot is given by its row and column, counted from zero, and the rank equals the number of pivots. In the 3 × 4 example the pivots sit on the diagonal, so the rank is 3.
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/rref \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"matrix":[[1,2,-1,-4],[2,3,-1,-11],[-2,0,-3,22]]}'const res = await fetch("https://api.kit.forhosting.com/algebra/rref", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"matrix": [
[
1,
2,
-1,
-4
],
[
2,
3,
-1,
-11
],
[
-2,
0,
-3,
22
]
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/rref",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"matrix": [
[
1,
2,
-1,
-4
],
[
2,
3,
-1,
-11
],
[
-2,
0,
-3,
22
]
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/rref", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"matrix":[[1,2,-1,-4],[2,3,-1,-11],[-2,0,-3,22]]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"matrix":[[1,2,-1,-4],[2,3,-1,-11],[-2,0,-3,22]]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/rref", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"matrix": [
[
1,
2,
-1,
-4
],
[
2,
3,
-1,
-11
],
[
-2,
0,
-3,
22
]
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.rref",
"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.
Limits
max_rows | 50 |
max_cols | 50 |
max_abs_entry | 1000000000000000 |
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
What reduced row echelon form means and what the response contains
Reduced row echelon form is the unique matrix obtained from a given matrix by elementary row operations so that every leading nonzero entry is one, every pivot is the only nonzero entry in its column, each pivot sits strictly to the right of the pivot in the row above, and any all-zero rows sit at the bottom. That shape makes the structure of a linear system transparent: pivot columns correspond to bound variables, free columns to free variables, and the number of pivots is the rank of the coefficient matrix. This calculator applies Gauss-Jordan elimination with partial pivoting on a copy of your matrix, scaling each pivot row so the pivot becomes one and eliminating every other entry in that column, both above and below. The response returns the RREF matrix rounded to the requested precision, an echo of the original matrix, zero-based pivot pairs, structured pivot_positions with row and col fields, the rank equal to the number of pivots, row and column counts, the method tag gauss_jordan_rref, the precision used, a short formula reminder, and the maximum supported dimensions. There is no approximate symbolic CAS path and no invented pseudoinverse: the engine either finishes elimination inside the supported size and magnitude limits or rejects the input with invalid_input. Rejected cases include a missing matrix, non-array rows, a row with the wrong number of entries compared with the first row, non-finite entries, and magnitudes above the documented ceiling.
How the matrix is read and how pivots stay reproducible
Optional leading plus signs and scientific notation on entry strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong RREF. Rectangular shapes are welcome: m need not equal n, so augmented systems such as three equations in four unknowns are first-class inputs. The preferred field is matrix, a nested array of rows of finite numbers with the same number of columns in every row, but aliases a, A, and mat are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. If any row has a different length than the first row, the request fails immediately with invalid_input naming that row and the expected versus actual entry counts, because a ragged array is not a well-defined matrix for elimination. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for every RREF entry, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing elimination yourself.
Where RREF fits in study, science, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with matrix inverse or matrix multiplication tools when you need related linear algebra steps, and with other math endpoints when you are building a small lab of free, deterministic algebra helpers.
Integration use cases
Deterministic test fixtures
Generate reproducible RREF matrices, pivot positions, and rank for unit tests, property checks, and CI assertions.
Technical questions
How are pivot positions reported?
Each pivot is a zero-based [row, col] pair in pivots, and the same indices appear in pivot_positions as {row, col}. Rank equals the number of pivots.