RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • cond
    • det
    • inv
    • linsolve
    • norm
    • null
    • pinv
    • rank
    • rcond
    • rref
    • vecnorm

rcond — Estimate reciprocal condition numbers in MATLAB and RunMat.

rc = rcond(A) estimates the reciprocal 1-norm condition number of square matrix A, preserving the Single class for Single input.

Syntax

c = rcond(A)

Inputs

A
Type
Any
Required
Yes
Description
Input square matrix.
NameTypeRequiredDefaultDescription
AAnyYes—Input square matrix.

Returns

c
Type
NumericScalar
Description
Reciprocal condition number estimate.
NameTypeDescription
cNumericScalarReciprocal condition number estimate.

Errors

RunMat:rcond:InvalidInput
When
Input shape/type is unsupported for reciprocal condition estimation.
Message
rcond: invalid input
RunMat:rcond:Internal
When
Runtime fails while computing rcond or executing fallback/upload paths.
Message
rcond: internal runtime failure
IdentifierWhenMessage
RunMat:rcond:InvalidInputInput shape/type is unsupported for reciprocal condition estimation.rcond: invalid input
RunMat:rcond:InternalRuntime fails while computing rcond or executing fallback/upload paths.rcond: internal runtime failure

Behavior

Inputs must be square matrices (scalars count as 1 × 1). Non-square inputs trigger the error "rcond: input must be a square matrix."

For the empty matrix (0 × 0) the reciprocal condition number is Inf.

rcond(0) returns 0. Non-zero scalars return 1.

Public MATLAB matrix classes are single and double. RunMat mode separately admits logical matrices and all eight real integer classes through named extensions; integer values cross only after exact binary64 representability checks.

Complex matrices use the same 1-norm estimator with adjoint solves; host Single input retains Single output class.

Host execution estimates the reciprocal 1-norm condition from pivoted LU solves without forming an inverse matrix.

Resident integer input bypasses floating provider condition-estimation kernels, gathers through its exact owner, and restores the double result to that owner when supported.

Acceleration and residency

When a provider exposes the rcond hook, the shipping backends gather to the host, use the shared 1-norm estimator, and restore the scalar to the source class when possible.

When that hook is unavailable, the Runtime gathers through the exact owner and runs the same 1-norm estimator; a linsolve 2-norm condition hint is not substituted.

Explicit device placement requires a class-preserving resident result or a typed capability error; no output is silently relabelled.

Implementation and validation

Original GPU declarations: precisions f32, f64; elementwise false; reduction false; broadcasting none.

Original fusion declarations: elementwise false; reduction false; max inputs 1; constants inline.

Examples

Reciprocal condition of the identity matrix

A = eye(3);
rc = rcond(A)

Expected output:

rc = 1

Detecting a nearly singular matrix

A = diag([1, 1e-8]);
rc = rcond(A)

Expected output:

rc = 1e-8

Reciprocal condition of a singular matrix

A = [1 2; 2 4];
rc = rcond(A)

Expected output:

rc = 0

Reciprocal condition for a complex matrix

A = [1+2i 0; 3i 2-1i];
rc = rcond(A)

Expected output:

rc ≈ 0.1824

Handling the empty matrix

rc = rcond([])

Expected output:

rc = Inf

Estimating conditioning on GPU data

G = gpuArray([2 0; 0 0.5]);
rc_gpu = rcond(G);
rc = gather(rc_gpu)

Expected output:

rc = 0.25

Using rcond with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how rcond changes the result.

Run a small rcond example, explain the result, then change one input and compare the output.

FAQ

What range of values should I expect from rcond?⌄

rcond returns a value in [0, 1]. Values near 1 indicate a well-conditioned matrix. Values near 0 indicate singular or ill-conditioned matrices.

Why does rcond return Inf for the empty matrix?⌄

The empty matrix is perfectly conditioned by convention, so the reciprocal condition number is Inf (1 / 0).

Does rcond warn me about singular systems automatically?⌄

rcond itself does not issue warnings. Use the value to decide whether the matrix is singular to working precision, similar to MATLAB workflows (if rcond(A) < eps, ...).

How is the reciprocal condition estimated?⌄

RunMat uses a pivoted LU factorization and a bounded inverse 1-norm estimate, without forming the inverse matrix. This is separate from the SVD tolerance used by pinv and rank.

Will calling rcond move my data off the GPU?⌄

The shipping providers gather to the shared host estimator and restore a class-preserving scalar. A future provider may implement the same 1-norm contract directly.

Related Linalg functions

Solve

cond · det · inv · linsolve · norm · null · pinv · rank · rref · vecnorm

Structure

bandwidth · isdiag · ishermitian · issymmetric · istril · istriu · symrcm

Factor

chol · decomposition · decomposition.ctranspose · decomposition.mldivide · decomposition.mrdivide · decomposition.mtimes · decomposition.rdivide · decomposition.subsref · decomposition.times · decomposition.uminus · decomposition.uplus · eig · eigs · gmres · ichol · ilu · lu · ordeig · ordqz · ordschur · pcg · qr · qz · rsf2csf · schur · svd

Ops

cross · ctranspose · dot · mldivide · mpower · mrdivide · mtimes · pagemtimes · pagetranspose · trace · transpose

Source you can read

Every RunMat function's source is public. Read exactly how rcond is executed, line by line, in Rust.

  • View the source for rcond in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Behavior
  • Acceleration and residency
  • Implementation and validation
  • Examples
  • Reciprocal condition of the identity matrix
  • Detecting a nearly singular matrix
  • Reciprocal condition of a singular matrix
  • Reciprocal condition for a complex matrix
  • Handling the empty matrix
  • Estimating conditioning on GPU data
  • Using rcond with coding agents
  • FAQ
  • Related Linalg functions
  • Solve
  • Structure
  • Factor
  • Ops
  • Source you can read
  • About RunMat