{"id":13619,"date":"2026-04-13T10:19:32","date_gmt":"2026-04-13T14:19:32","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=13619"},"modified":"2026-04-13T10:19:32","modified_gmt":"2026-04-13T14:19:32","slug":"matrix-condition-and-the-qr-decomposition","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2026\/04\/13\/matrix-condition-and-the-qr-decomposition\/","title":{"rendered":"Matrix Condition and the QR Decomposition"},"content":{"rendered":"<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\">\r\n<html>\r\n<head>\r\n<META http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\">\r\n<!--\r\nThis HTML was auto-generated from MATLAB code.\r\nTo make changes, update the MATLAB code and republish this document.\r\n      -->\r\n<title>Matrix Condition and the QR Decomposition<\/title>\r\n<meta name=\"generator\" content=\"MATLAB 26.1\">\r\n<link rel=\"schema.DC\" href=\"http:\/\/purl.org\/dc\/elements\/1.1\/\">\r\n<meta name=\"DC.date\" content=\"2026-04-13\">\r\n<meta name=\"DC.source\" content=\"QR_blog.m\">\r\n<style type=\"text\/css\">\r\nhtml,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}\r\n\r\nhtml { min-height:100%; margin-bottom:1px; }\r\nhtml body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }\r\nhtml body td { vertical-align:top; text-align:left; }\r\n\r\nh1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }\r\nh2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }\r\nh3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }\r\n\r\na { color:#005fce; text-decoration:none; }\r\na:hover { color:#005fce; text-decoration:underline; }\r\na:visited { color:#004aa0; text-decoration:none; }\r\n\r\np { padding:0px; margin:0px 0px 20px; }\r\nimg { padding:0px; margin:0px 0px 20px; border:none; }\r\np img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }\r\n\r\nul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }\r\nul li { padding:0px; margin:0px 0px 7px 0px; }\r\nul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }\r\nul li ol li { list-style:decimal; }\r\nol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }\r\nol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }\r\nol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }\r\nol li ol li { list-style-type:lower-alpha; }\r\nol li ul { padding-top:7px; }\r\nol li ul li { list-style:square; }\r\n\r\n.content { font-size:1.2em; line-height:140%; padding: 20px; }\r\n\r\npre, code { font-size:12px; }\r\ntt { font-size: 1.2em; }\r\npre { margin:0px 0px 20px; }\r\npre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }\r\npre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }\r\npre.error { color:red; }\r\n\r\n@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }\r\n\r\nspan.keyword { color:#0000FF }\r\nspan.comment { color:#228B22 }\r\nspan.string { color:#A020F0 }\r\nspan.untermstring { color:#B20000 }\r\nspan.syscmd { color:#B28C00 }\r\nspan.typesection { color:#A0522D }\r\n\r\n.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }\r\n.footer p { margin:0px; }\r\n.footer a { color:#878787; }\r\n.footer a:hover { color:#878787; text-decoration:underline; }\r\n.footer a:visited { color:#878787; }\r\n\r\ntable th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }\r\ntable td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }\r\n\r\n\r\n\r\n\r\n\r\n  <\/style>\r\n<\/head>\r\n<body>\r\n<div class=\"content\">\r\n<!--introduction-->\r\n<p>The QR decomposition provides an estimate of the matrix condition number.<\/p>\r\n<!--\/introduction-->\r\n<h2>Contents<\/h2>\r\n<div>\r\n<ul>\r\n<li>\r\n<a href=\"#1\">Query<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#2\">Short answer<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#3\">QR Decomposition<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#4\">tricond<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#5\"><tt>qr<\/tt> function<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#12\">Gallery<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#20\">Tests<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#21\">Plot<\/a>\r\n<\/li>\r\n<\/ul>\r\n<\/div>\r\n<h2 id=\"1\">Query<\/h2>\r\n<p>Professor Magdy Hanna of the Department of Engineering Mathematics and Physics at Fayoum University in Fayoum, Egypt, asked me:<\/p>\r\n<pre>  If we have the QR decomposition of a matrix, with or without\r\n  pivoting, is there an easy way to get the condition number of\r\n  the matrix without starting from scratch and using the SVD?<\/pre>\r\n<h2 id=\"2\">Short answer<\/h2>\r\n<p>The short answer to Prof. Hanna's question is:<\/p>\r\n<pre>  Yes.  The ratio of the largest and smallest diagonal elements\r\n  of qr(A) is often a good estimate of cond(A).<\/pre>\r\n<p>Compare this estimate to the exact condition of a magic square. Produce a <tt>score<\/tt> measuring how well the estimate does.<\/p>\r\n<pre class=\"codeinput\">     A = magic(11);\r\n     R = qr(A);\r\n     d = abs(diag(R));\r\n     est = max(d)\/min(d);\r\n     kappa = cond(A);\r\n     disp(<span class=\"string\">\"       est     kappa     score\"<\/span>)\r\n     disp([est kappa est\/kappa])\r\n<\/pre>\r\n<pre class=\"codeoutput\"> \r\n\r\n       est     kappa     score\r\n    2.6964   11.1021    0.2429\r\n\r\n<\/pre>\r\n<h2 id=\"3\">QR Decomposition<\/h2>\r\n<p>A more complete answer involves column pivoting.<\/p>\r\n<p>The QR decomposition <b>without<\/b> column pivoting is an orthogonal Q and an upper triangular R so that<\/p>\r\n<pre>  A = Q*R<\/pre>\r\n<p>The QR composition <b>with<\/b> column pivoting is an orthogonal Q, an upper triangular R and a permutation P that reorders the columns of A so that<\/p>\r\n<pre>  A*P = Q*R<\/pre>\r\n<p>In either case, Q and P are orthogonal, so<\/p>\r\n<pre>  cond(R) = cond(A)<\/pre>\r\n<p>Any estimate of the condition of R provides an estimate of the condition of A.<\/p>\r\n<h2 id=\"4\">tricond<\/h2>\r\n<p>An estimate the condition of a triangular matrix is the ratio of the largest and smallest elements on the diagonal.<\/p>\r\n<pre class=\"codeinput\">   type <span class=\"string\">tricond<\/span>\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\n     function cond = tricond(T)\r\n        % Estimate condition of lower or upper triangular matrix.\r\n        if istril(T) || istriu(T)\r\n            D = diag(abs(T));\r\n            cond = max(D)\/min(D);\r\n        else\r\n            cond =  NaN;\r\n        end\r\n     end\r\n<\/pre>\r\n<h2 id=\"5\">\r\n<tt>qr<\/tt> function<\/h2>\r\n<p>Here is the 4-by-4 <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2018\/02\/19\/fun-with-the-pascal-triangle\/\">Pascal matrix<\/a>\r\n<\/p>\r\n<pre class=\"codeinput\">    A = pascal(4)\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nA =\r\n\r\n     1     1     1     1\r\n     1     2     3     4\r\n     1     3     6    10\r\n     1     4    10    20\r\n\r\n<\/pre>\r\n<p>This matrix is reasonably well conditioned.<\/p>\r\n<pre class=\"codeinput\">    kappa = cond(A)\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nkappa =\r\n\r\n  691.9374\r\n\r\n<\/pre>\r\n<p>With one output, the <tt>qr<\/tt> function provides the \"Q-less\" QR decomposition with no pivoting.<\/p>\r\n<p>(With two outputs, the <tt>qr<\/tt> function produces the same R and also reveals the orthogonal Q.)<\/p>\r\n<pre class=\"codeinput\">    R = qr(A)\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nR =\r\n\r\n   -2.0000   -5.0000  -10.0000  -17.5000\r\n         0   -2.2361   -6.7082  -14.0872\r\n         0         0    1.0000    3.5000\r\n         0         0         0   -0.2236\r\n\r\n<\/pre>\r\n<p>For this matrix <tt>tricond<\/tt> without pivoting produces a poor estimate of the exact condition.<\/p>\r\n<pre class=\"codeinput\">    trico = tricond(R);\r\n    kappa = cond(A);\r\n    disp(<span class=\"string\">\"   tricond     kappa     score\"<\/span>)\r\n    disp([trico kappa trico\/kappa])\r\n<\/pre>\r\n<pre class=\"codeoutput\">  \r\n\r\n   tricond     kappa     score\r\n   10.0000  691.9374    0.0145\r\n\r\n<\/pre>\r\n<p>With three outputs, <tt>qr<\/tt> does column pivoting and returns a different R.<\/p>\r\n<pre class=\"codeinput\">    [Q,R,P] = qr(A);\r\n    R\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nR =\r\n\r\n  -22.7376   -5.2336   -1.5393  -12.0065\r\n         0   -1.6153   -1.2034   -1.3387\r\n         0         0    0.4270   -0.2170\r\n         0         0         0   -0.0638\r\n\r\n<\/pre>\r\n<p>Compare <tt>tricond<\/tt> and the exact condition.<\/p>\r\n<pre class=\"codeinput\">    trico = tricond(R);\r\n    disp(<span class=\"string\">\"   tricond     kappa     score\"<\/span>)\r\n    disp([trico kappa trico\/kappa])\r\n<\/pre>\r\n<pre class=\"codeoutput\"> \r\n\r\n   tricond     kappa     score\r\n  356.6259  691.9374    0.5154\r\n\r\n<\/pre>\r\n<p>Column pivoting produces a much better <tt>tricond<\/tt> estimate for this matrix.<\/p>\r\n<h2 id=\"12\">Gallery<\/h2>\r\n<p>Let's do more tests using these matrices from the <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2019\/06\/24\/bohemian-matrices-in-the-matlab-gallery\">MATLAB Gallery<\/a>.<\/p>\r\n<pre class=\"codeinput\">    funs = [<span class=\"string\">\"moler\"<\/span>, <span class=\"string\">\"parter\"<\/span>, <span class=\"string\">\"binomial\"<\/span>,  <span class=\"string\">\"chebspec\"<\/span>, <span class=\"string\">\"cauchy\"<\/span>,<span class=\"keyword\">...<\/span>\r\n           <span class=\"string\">\"chebspec\"<\/span>, <span class=\"string\">\"chebvand\"<\/span>,<span class=\"string\">\"circul\"<\/span>, <span class=\"string\">\"frank\"<\/span>, <span class=\"string\">\"ris\"<\/span>];\r\n<\/pre>\r\n<p>One of these Gallery matrices is the \"moler\" matrix, even though I didn't invent it. A precursor to the \"moler\" matrix is a badly conditioned upper triangular matrix with ones on the diagonal, minus ones above the diagonal and zeros below.<\/p>\r\n<pre class=\"codeinput\">    n = 5;\r\n    U = eye(n) - triu(ones(n),1)\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nU =\r\n\r\n     1    -1    -1    -1    -1\r\n     0     1    -1    -1    -1\r\n     0     0     1    -1    -1\r\n     0     0     0     1    -1\r\n     0     0     0     0     1\r\n\r\n<\/pre>\r\n<p>The \"moler\" matrix is<\/p>\r\n<pre class=\"codeinput\">    M = U'*U\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nM =\r\n\r\n     1    -1    -1    -1    -1\r\n    -1     2     0     0     0\r\n    -1     0     3     1     1\r\n    -1     0     1     4     2\r\n    -1     0     1     2     5\r\n\r\n<\/pre>\r\n<p>The \"moler\" matrix squares the condition of U. The condition of M grows like 4^n.<\/p>\r\n<pre class=\"codeinput\">    kappa = cond(M)\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\nkappa =\r\n\r\n  865.9801\r\n\r\n<\/pre>\r\n<p>The <tt>tricond<\/tt> score without column pivoting is very poor.<\/p>\r\n<pre class=\"codeinput\">    R = qr(M);\r\n    trico = tricond(R);\r\n    disp(<span class=\"string\">\"   tricond     kappa     score\"<\/span>)\r\n    disp([trico kappa trico\/kappa])\r\n<\/pre>\r\n<pre class=\"codeoutput\"> \r\n\r\n   tricond     kappa     score\r\n   20.7364  865.9801    0.0239\r\n\r\n<\/pre>\r\n<p>With pivoting the score is much better.<\/p>\r\n<pre class=\"codeinput\">    [~,R,~] = qr(M);\r\n<\/pre>\r\n<pre class=\"codeinput\">    trico = tricond(R);\r\n    disp(<span class=\"string\">\"   tricond     kappa     score\"<\/span>)\r\n    disp([trico kappa trico\/kappa])\r\n<\/pre>\r\n<pre class=\"codeoutput\">  \r\n\r\n  tricond     kappa     score\r\n  555.0198  865.9801    0.6409\r\n\r\n<\/pre>\r\n<p>These scores are in the first line of the following output and in the upper left-hand corners of the 3-D bar graphs.<\/p>\r\n<h2 id=\"20\">Tests<\/h2>\r\n<pre class=\"codeinput\">   [Dnopiv,Dpiv,xt,yt] = tester(funs);\r\n<\/pre>\r\n<pre class=\"codeoutput\">\r\n\r\n         fun     n    nopiv    piv\r\n\r\n\r\n       moler     5    0.024    0.641 \r\n                10    0.000    0.426 \r\n                15    0.000    0.337 \r\n                20    0.000    0.287 \r\n                25    0.000    0.372 \r\n\r\n      parter     5    0.610    0.804 \r\n                10    0.564    0.776 \r\n                15    0.536    0.757 \r\n                20    0.517    0.744 \r\n                25    0.502    0.735 \r\n\r\n    binomial     5    0.795    0.926 \r\n                10    0.387    0.817 \r\n                15    0.150    0.768 \r\n                20    0.056    0.696 \r\n                25    0.021    0.674 \r\n\r\n    chebspec     5    0.120    0.110 \r\n                10    0.236    0.095 \r\n                15    0.183    0.358 \r\n                20    0.132    0.165 \r\n                25    0.022    0.318 \r\n\r\n      cauchy     5    0.217    0.376 \r\n                10    0.034    0.242 \r\n                15    0.016    0.247 \r\n                20    0.058    0.116 \r\n                25    0.102    0.222 \r\n\r\n    chebspec     5    0.120    0.110 \r\n                10    0.236    0.095 \r\n                15    0.183    0.358 \r\n                20    0.132    0.165 \r\n                25    0.022    0.318 \r\n\r\n    chebvand     5    0.055    0.577 \r\n                10    0.002    0.326 \r\n                15    0.000    0.338 \r\n                20    0.000    0.492 \r\n                25    0.000    0.082 \r\n\r\n      circul     5    0.370    0.370 \r\n                10    0.252    0.252 \r\n                15    0.209    0.209 \r\n                20    0.180    0.180 \r\n                25    0.162    0.162 \r\n\r\n       frank     5    0.390    0.390 \r\n                10    0.257    0.296 \r\n                15    0.191    0.248 \r\n                20      Inf    0.013 \r\n                25    0.039    0.100 \r\n\r\n         ris     5    0.610    0.804 \r\n                10    0.564    0.776 \r\n                15    0.536    0.757 \r\n                20    0.517    0.744 \r\n                25    0.502    0.735 \r\n\r\n<\/pre>\r\n<h2 id=\"21\">Plot<\/h2>\r\n<pre class=\"codeinput\">   [c,ax1,ax2] = ploter(funs,Dnopiv,Dpiv,xt,yt);\r\n<\/pre>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/QR_blog_01.png\" alt=\"\"> <p class=\"footer\">\r\n<br>\r\n<a href=\"https:\/\/www.mathworks.com\/products\/matlab\/\">Published with MATLAB&reg; R2026a<\/a>\r\n<br>\r\n<\/p>\r\n<\/div>\r\n<!--\r\n##### SOURCE BEGIN #####\r\n%% Matrix Condition and the QR Decomposition\r\n% The QR decomposition provides an estimate of\r\n% the matrix condition number.\r\n\r\n%% Query\r\n% Professor Magdy Hanna of the Department of Engineering Mathematics\r\n% and Physics at Fayoum University in Fayoum, Egypt, asked me:\r\n%\r\n%    If we have the QR decomposition of a matrix, with or without\r\n%    pivoting, is there an easy way to get the condition number of\r\n%    the matrix without starting from scratch and using the SVD?\r\n\r\n%% Short answer\r\n% The short answer to Prof. Hanna's question is:\r\n% \r\n%    Yes.  The ratio of the largest and smallest diagonal elements\r\n%    of qr(A) is often a good estimate of cond(A).\r\n%\r\n% Compare this estimate to the exact condition of a magic\r\n% square.  Produce a |score| measuring how well the\r\n% estimate does.\r\n\r\n     A = magic(11);\r\n     R = qr(A);\r\n     d = abs(diag(R));\r\n     est = max(d)\/min(d);\r\n     kappa = cond(A);\r\n     disp(\"       est     kappa     score\")\r\n     disp([est kappa est\/kappa])\r\n\r\n%% QR Decomposition\r\n% A more complete answer involves column pivoting.\r\n%\r\n% The QR decomposition *without* column pivoting is\r\n% an orthogonal Q and an upper triangular R so that\r\n%\r\n%    A = Q*R\r\n%\r\n% The QR composition *with* column pivoting is\r\n% an orthogonal Q, an upper triangular R and\r\n% a permutation P that reorders the columns of A so that\r\n%\r\n%    A*P = Q*R\r\n%\r\n% In either case, Q and P are orthogonal, so\r\n%\r\n%    cond(R) = cond(A)\r\n%\r\n% Any estimate of the condition of R provides an estimate of \r\n% the condition of A.\r\n%\r\n\r\n%% tricond\r\n% An estimate the condition of a triangular matrix is the ratio of the\r\n% largest and smallest elements on the diagonal.\r\n\r\n   type tricond\r\n\r\n%% |qr| function\r\n% Here is the 4-by-4\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2018\/02\/19\/fun-with-the-pascal-triangle\/\r\n% Pascal matrix>\r\n\r\n    A = pascal(4)\r\n\r\n%%\r\n% This matrix is reasonably well conditioned.\r\n\r\n    kappa = cond(A)\r\n\r\n%%\r\n% With one output, the |qr| function provides the \"Q-less\" QR\r\n% decomposition with no pivoting.\r\n%\r\n% (With two outputs, the |qr| function produces the same R and also\r\n% reveals the orthogonal Q.)\r\n\r\n    R = qr(A)\r\n\r\n%%\r\n% For this matrix |tricond| without pivoting produces a poor\r\n% estimate of the exact condition.\r\n\r\n    trico = tricond(R);\r\n    kappa = cond(A);\r\n    disp(\"   tricond     kappa     score\")\r\n    disp([trico kappa trico\/kappa])\r\n       \r\n%%\r\n% With three outputs, |qr| does column pivoting and returns\r\n% a different R.\r\n\r\n    [Q,R,P] = qr(A); \r\n    R\r\n    \r\n%%\r\n% Compare |tricond| and the exact condition.\r\n\r\n    trico = tricond(R);\r\n    disp(\"   tricond     kappa     score\")\r\n    disp([trico kappa trico\/kappa])\r\n\r\n%%\r\n% Column pivoting produces a much better |tricond| estimate\r\n% for this matrix.\r\n% \r\n\r\n%% Gallery\r\n% Let's do more tests using these matrices from the  \r\n% <https:\/\/blogs.mathworks.com\/cleve\/2019\/06\/24\/bohemian-matrices-in-the-matlab-gallery \r\n% MATLAB Gallery>.\r\n\r\n    funs = [\"moler\", \"parter\", \"binomial\",  \"chebspec\", \"cauchy\",...\r\n           \"chebspec\", \"chebvand\",\"circul\", \"frank\", \"ris\"];\r\n\r\n%%\r\n% One of these Gallery matrices is the \"moler\" matrix, even though\r\n% I didn't invent it.  A precursor to the \"moler\" matrix is\r\n% a badly conditioned upper triangular matrix with ones on the diagonal, \r\n% minus ones above the diagonal and zeros below.\r\n \r\n    n = 5;\r\n    U = eye(n) - triu(ones(n),1)\r\n\r\n%%\r\n% The \"moler\" matrix is\r\n\r\n    M = U'*U\r\n\r\n%%\r\n% The \"moler\" matrix squares the condition of U.\r\n% The condition of M grows like 4^n.\r\n\r\n    kappa = cond(M)\r\n\r\n%%\r\n% The |tricond| score without column pivoting is very poor.\r\n\r\n    R = qr(M);\r\n    trico = tricond(R);\r\n    disp(\"   tricond     kappa     score\")\r\n    disp([trico kappa trico\/kappa])\r\n    \r\n%%\r\n% With pivoting the score is much better.\r\n\r\n    [~,R,~] = qr(M);\r\n\r\n%%\r\n\r\n    trico = tricond(R);\r\n    disp(\"   tricond     kappa     score\")\r\n    disp([trico kappa trico\/kappa])\r\n\r\n%%\r\n% These scores are in the first line of the following output and\r\n% in the upper left-hand corners of the 3-D bar graphs.\r\n\r\n%% Tests\r\n \r\n\r\n   [Dnopiv,Dpiv,xt,yt] = tester(funs);\r\n\r\n%% Plot\r\n\r\n   [c,ax1,ax2] = ploter(funs,Dnopiv,Dpiv,xt,yt);\r\n\r\n\r\n\r\n\r\n##### SOURCE END #####\r\n-->\r\n<\/body>\r\n<\/html>\r\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/QR_thumb.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction-->\r\n<p>The QR decomposition provides an estimate of the matrix condition number.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2026\/04\/13\/matrix-condition-and-the-qr-decomposition\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":13620,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[32,23,6,16,37,30],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13619"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=13619"}],"version-history":[{"count":9,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13619\/revisions"}],"predecessor-version":[{"id":13629,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13619\/revisions\/13629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/13620"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=13619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=13619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=13619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}