new file: Files/flashplayer_32_sa.exe new file: favicon.ico new file: globe.gif new file: imgs/download.png new file: imgs/zuck.jpg new file: index.html new file: other.ico new file: script.js new file: site.webmanifest new file: sitemap.html new file: styles/backround.css new file: styles/border.css new file: styles/fonts/Titillium_Web/OFL.txt new file: styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf new file: styles/fonts/webfontkit-20221027-163353/generator_config.txt new file: styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2 new file: styles/fonts/webfontkit-20221027-165950/generator_config.txt new file: styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2 new file: styles/style.css new file: tools/2048/.gitignore new file: tools/2048/.jshintrc new file: tools/2048/CONTRIBUTING.md new file: tools/2048/LICENSE.txt new file: tools/2048/README.md new file: tools/2048/Rakefile new file: tools/2048/favicon.ico new file: tools/2048/index.html new file: tools/2048/js/animframe_polyfill.js new file: tools/2048/js/application.js new file: tools/2048/js/bind_polyfill.js new file: tools/2048/js/classlist_polyfill.js new file: tools/2048/js/game_manager.js new file: tools/2048/js/grid.js new file: tools/2048/js/html_actuator.js new file: tools/2048/js/keyboard_input_manager.js new file: tools/2048/js/local_storage_manager.js new file: tools/2048/js/tile.js new file: tools/2048/meta/apple-touch-icon.png new file: tools/webretro/cores/neocd_libretro.js new file: tools/webretro/cores/neocd_libretro.wasm new file: tools/webretro/cores/nestopia_libretro.js new file: tools/webretro/cores/nestopia_libretro.wasm new file: tools/webretro/cores/o2em_libretro.js new file: tools/webretro/cores/o2em_libretro.wasm new file: tools/webretro/cores/opera_libretro.js new file: tools/webretro/cores/opera_libretro.wasm
690 lines
21 KiB
HTML
690 lines
21 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
|
||
|
||
<!-- Mirrored from www.mathsisfun.com/algebra/matrix-inverse.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:59:45 GMT -->
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
|
||
|
||
|
||
<!-- #BeginEditable "doctitle" -->
|
||
<title>Inverse of a Matrix</title>
|
||
<meta name="Description" content="Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents.">
|
||
|
||
|
||
|
||
<style>
|
||
|
||
.mat {
|
||
font: 20px Verdana, Arial, Trebuchet MS, Tahoma, Geneva, Verdana, sans-serif;
|
||
color: #f30;
|
||
|
||
background-image: linear-gradient(#07c, #07c),
|
||
linear-gradient(#07c, #07c),
|
||
linear-gradient(#07c, #07c),
|
||
linear-gradient(#07c, #07c);
|
||
|
||
background-repeat: no-repeat;
|
||
background-size: 7px 2px;
|
||
background-position: top left, top right, bottom left, bottom right;
|
||
|
||
border: solid #07c;
|
||
|
||
border-width: 0 2px;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
|
||
padding: 2px 9px 3px 9px;
|
||
|
||
border-radius:3px;
|
||
|
||
}
|
||
|
||
|
||
.cols1, .cols2, .cols3, .cols4 {
|
||
display: inline-grid;
|
||
grid-template-columns: max-content;
|
||
align-content: space-evenly;
|
||
grid-gap: 4px 14px;
|
||
text-align: center;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.cols1 { grid-template-columns: max-content; }
|
||
.cols2 { grid-template-columns: repeat(2, max-content); }
|
||
.cols3 { grid-template-columns: repeat(3, max-content); }
|
||
.cols4 { grid-template-columns: repeat(4, max-content); }
|
||
|
||
.txt {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
padding: 3px 3px;
|
||
font: 1.5rem Verdana, Geneva, sans-serif;
|
||
color: orange;
|
||
text-align: center;
|
||
min-width: 25px;
|
||
}
|
||
.txt .intbl {font-size: 90%; }
|
||
|
||
.inv { color:#07c; display:inline-block; transform: translateX(-0.1em) translateY(-1.1em); font-size: 90%; }
|
||
|
||
</style>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- #EndEditable -->
|
||
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
<meta name="HandheldFriendly" content="true">
|
||
<meta name="referrer" content="always">
|
||
<link rel="stylesheet" href="../style4.css">
|
||
<script src="../main4.js"></script>
|
||
<script>document.write(gTagHTML())</script>
|
||
</head>
|
||
|
||
<body id="bodybg" class="adv">
|
||
|
||
<div id="stt"></div>
|
||
<div id="adTop"></div>
|
||
<header>
|
||
<div id="hdr"></div>
|
||
<div id="tran"></div>
|
||
<div id="adHide"></div>
|
||
<div id="cookOK"></div>
|
||
</header>
|
||
|
||
<div class="mid">
|
||
|
||
<nav>
|
||
<div id="menuWide" class="menu"> </div>
|
||
<div id="logo"><a href="../index.html"><img src="../images/style/logo-adv.svg" alt="Math is Fun"></a></div>
|
||
|
||
<div id="search" role="search"></div>
|
||
<div id="linkto"></div>
|
||
|
||
<div id="menuSlim" class="menu"></div>
|
||
<div id="menuTiny" class="menu"></div>
|
||
</nav>
|
||
|
||
<div id="extra"></div>
|
||
|
||
<article id="content" role="main">
|
||
|
||
<!-- #BeginEditable "Body" -->
|
||
|
||
<h1 class="center">Inverse of a Matrix</h1>
|
||
|
||
<p class="center">Please read our <a href="matrix-introduction.html">Introduction to Matrices</a> first.</p>
|
||
<h2>What is the Inverse of a Matrix?</h2>
|
||
<p>Just like a <b>number </b>has a <a href="../reciprocal.html">reciprocal</a> ...
|
||
</p>
|
||
<p class="center"><img src="../numbers/images/reciprocal-reciprocal.svg" alt="Reciprocal of 8 is 1/8 and back again"><br>
|
||
Reciprocal of a Number (note: <span class="large"><span class="intbl"><em>1</em><strong>8</strong></span></span> can also be written <span class="large">8<sup>-1</sup></span>)</p>... a <b>matrix </b>has an <b>inverse :</b><span class="larger"></span>
|
||
<p class="center"><img src="images/matrix-inverse-both.svg" alt="Reciprocal of A is A-inverse and back again"><br>Inverse of a Matrix</p>We write <span class="larger">A<sup>-1</sup></span> instead of <span class="larger"><span class="intbl"><em>1</em><strong>A</strong></span></span> because we don't divide by a matrix!
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>And there are other similarities:</p>
|
||
<div class="dotpoint">
|
||
<p>When we <b>multiply a number</b> by its <b>reciprocal</b> we get <b>1</b>:</p>
|
||
<div class="center larger">8 × <span class="intbl"><em>1</em><strong>8</strong></span> = <b>1</b></div>
|
||
<!-- 8 * 1/8 = 1 -->
|
||
|
||
|
||
<p>When we <b>multiply a matrix</b> by its <b>inverse</b> we get the<b> Identity Matrix</b> (which is like "1" for matrices):</p>
|
||
|
||
|
||
|
||
<div class="center larger">A × A<sup>-1</sup> = <b>I</b></div>
|
||
</div>
|
||
|
||
<div class="dotpoint">
|
||
<p>Same thing when the inverse comes first:</p>
|
||
<div class="center larger"><span class="intbl"><em>1</em><strong>8</strong></span> × 8 = <b>1</b></div>
|
||
<!-- 1/8 * 8 = 1 -->
|
||
<div class="center larger">A<sup>-1</sup> × A = <b>I</b></div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<h2>Identity Matrix</h2>
|
||
<p>We just mentioned the "Identity Matrix". It is the matrix equivalent of the number "1":</p>
|
||
<div style="text-align: center;">
|
||
<div class="txt">I =</div>
|
||
<div class="mat">
|
||
<div class="cols3">
|
||
<span>1</span><span>0</span><span>0</span>
|
||
<span>0</span><span>1</span><span>0</span>
|
||
<span>0</span><span>0</span><span>1</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- I = [1,0,0~0,1,0~0,0,1] -->
|
||
|
||
|
||
<p class="large center">A 3x3 Identity Matrix</p></div>
|
||
<ul>
|
||
<li>It is "square" (has same number of rows as columns),</li>
|
||
<li>It has <b>1</b>s on the diagonal and <b>0</b>s everywhere else.</li>
|
||
<li>Its symbol is the capital letter <b>I</b>.</li>
|
||
</ul>
|
||
<p>The Identity Matrix can be 2×2 in size, or 3×3, 4×4, etc ...</p>
|
||
|
||
<h2>Definition</h2>
|
||
<p>Here is the definition:</p>
|
||
<div class="def">
|
||
<p>The inverse of <span class="larger">A</span> is <span class="larger">A<sup>-1</sup></span> only when:</p>
|
||
<p class="center"><span class="larger">AA<sup>-1</sup> = A<sup>-1</sup>A = <b>I</b></span></p>
|
||
<p>Sometimes there is no inverse at all.</p>
|
||
|
||
</div><p>(Note: writing AA<sup>-1 </sup>means A times A<sup>-1</sup>)</p>
|
||
<h2>2x2 Matrix</h2>
|
||
<p>OK, how do we calculate the inverse?</p>
|
||
<p>Well, for a 2x2 matrix the inverse is:</p>
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>a</span><span>b</span>
|
||
<span>c</span><span>d</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"><span class="inv">−1</span> = <span class="intbl"><em>1</em><strong>ad−bc</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>d</span><span>−b</span>
|
||
<span>−c</span><span>a</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [a,b~c,d] -1 = 1/ad-bc [d,-b~-c,a] -->
|
||
|
||
|
||
|
||
<p>In other words: <b>swap</b> the positions of a and d, put <b>negatives</b> in front of b and c, and <b>divide</b> everything by <b>ad−bc</b> .</p>
|
||
<p class="center">Note: <b>ad−bc</b> is called the <a href="matrix-determinant.html">determinant</a>.</p>
|
||
<p>Let us try an example:</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>4</span><span>7</span> <span>2</span><span>6</span>
|
||
</div></div>
|
||
<div class="txt"><span class="inv">−1</span> = <span class="intbl"><em>1</em><strong>4×6−7×2</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>6</span><span>−7</span>
|
||
<span>−2</span><span>4</span>
|
||
</div></div>
|
||
</div>
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">= <span class="intbl"><em>1</em><strong>10</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>6</span><span>−7</span>
|
||
<span>−2</span><span>4</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = 1/10 [6,-7~-2,4] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>0.6</span><span>−0.7</span>
|
||
<span>−0.2</span><span>0.4</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [0.6,-0.7~-0.2,0.4] -->
|
||
|
||
|
||
|
||
<p>How do we know this is the right answer?</p>
|
||
<p class="center80" align="center">Remember it must be true that: <span class="larger">AA<sup>-1</sup> = <b>I</b></span></p>
|
||
<p>So, let us check to see what happens when we <a href="matrix-multiplying.html">multiply the matrix</a> by its inverse:</p>
|
||
<p><br></p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="txt"></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>4</span><span>7</span>
|
||
<span>2</span><span>6</span>
|
||
</div>
|
||
</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>0.6</span><span>−0.7</span>
|
||
<span>−0.2</span><span>0.4</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>4×0.6+7×−0.2</span><span>4×−0.7+7×0.4</span>
|
||
<span>2×0.6+6×−0.2</span><span>2×−0.7+6×0.4</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [4,7~2,6][0.6,-0.7~-0.2,0.4] = [4*0.6+7*-0.2, 4*-0.7+7*0.4 ~ 2*0.6+6*-0.2, 2*-0.7+6*0.4] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>2.4−1.4</span><span>−2.8+2.8</span>
|
||
<span>1.2−1.2</span><span>−1.4+2.4</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [2.4-1.4, -2.8+2.8 ~ 1.2-1.2, -1.4+2.4] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>1</span><span>0</span>
|
||
<span>0</span><span>1</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [1,0~0,1] -->
|
||
|
||
|
||
<p class="center">And, hey!, we end up with the Identity Matrix! <br>So it must be right.</p>
|
||
<p class="center"><br></p>
|
||
<p class="center80" align="center">It should <b>also</b> be true that: <span class="larger">A<sup>-1</sup>A = <b>I</b></span></p>
|
||
<p>Why don't you have a go at multiplying these? See if you also get the Identity Matrix:</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>0.6</span><span>−0.7</span>
|
||
<span>−0.2</span><span>0.4</span>
|
||
</div>
|
||
</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>4</span><span>7</span>
|
||
<span>2</span><span>6</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2" style="width:220px;">
|
||
<span> </span><span> </span>
|
||
<span> </span><span> </span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [0.6,-0.7~-0.2,0.4][4,7~2,6] = [,~,] -->
|
||
|
||
|
||
<h2>Why Do We Need an Inverse?</h2>
|
||
<p>Because with matrices we <b>don't divide</b>! Seriously, there is no concept of dividing by a matrix.</p>
|
||
<p>But we can <b>multiply by an inverse</b>, which achieves the same thing.</p>
|
||
<div class="example">
|
||
<h3>Imagine we can't divide by numbers ...</h3>
|
||
<p>... and someone asks "How do I share 10 apples with 2 people?"</p>
|
||
<p>But we can take the <b>reciprocal</b> of 2 (which is 0.5), so we answer:</p>
|
||
<p class="center"><b>10 × 0.5 = 5</b></p>
|
||
<p class="center">They get 5 apples each.</p>
|
||
</div>
|
||
<p>The same thing can be done with matrices:</p>
|
||
<div class="example">
|
||
<p>Say we want to find matrix X, and we know matrix A and B:</p>
|
||
<p class="center larger">XA = B</p>
|
||
<p>It would be nice to divide both sides by A (to get X=B/A), but remember <b>we can't divide</b>.</p>
|
||
<p> </p>
|
||
<p>But what if we multiply both sides by A<sup>-1</sup> ?</p>
|
||
<p class="center larger">XAA<sup>-1</sup> = BA<sup>-1</sup></p>
|
||
<p>And we know that AA<sup>-1</sup> = I, so:</p>
|
||
<p class="center larger">XI = BA<sup>-1</sup></p>
|
||
<p>We can remove I (for the same reason we can remove "1" from 1x = ab for numbers):</p>
|
||
|
||
<p class="center larger">X = BA<sup>-1</sup></p>
|
||
<p>And we have our answer (assuming we can calculate A<sup>-1</sup>)</p></div>
|
||
<p>In that example we were very careful to get the multiplications correct, because with matrices the order of multiplication matters. AB is almost never equal to BA.</p>
|
||
<h2>A Real Life Example: Bus and Train</h2>
|
||
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/train.jpg" height="154" width="240"></p>
|
||
<p>A group took a trip on a <b>bus</b>, at $3 per child and $3.20 per adult for a total of $118.40.</p>
|
||
<p>They took the <b>train</b> back at $3.50 per child and $3.60 per adult for a total of $135.20.</p>
|
||
<p>How many children, and how many adults?</p>
|
||
<div style="clear:both"></div>
|
||
<p>First, let us set up the matrices (be careful to get the rows and columns correct!):</p>
|
||
<p class="center"><img src="images/matrix-inverse-2x2-exr1.svg" alt="matrix inverse 2x2 bus"></p>
|
||
<p>This is just like the example above:</p>
|
||
<p class="center"><span class="larger">XA = B</span></p>
|
||
<p>So to solve it we need the inverse of "A":</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3</span><span>3.5</span>
|
||
<span>3.2</span><span>3.6</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"><span class="inv">−1</span> = <span class="intbl"><em>1</em><strong>3×3.6−3.5×3.2</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3.6</span><span>−3.5</span>
|
||
<span>−3.2</span><span>3</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [3,3.5~3.2,3.6] -1 = 1/3*3.6-3.5*3.2 [3.6,-3.5~-3.2,3] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>−9</span><span>8.75</span>
|
||
<span>8</span><span>−7.5</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [-9,8.75~8,-7.5] -->
|
||
|
||
|
||
|
||
|
||
<p> </p>
|
||
<p>Now we have the inverse we can solve using:</p>
|
||
<p class="center"><span class="larger">X = BA<sup>-1</sup></span></p>
|
||
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>x<sub>1</sub></span><span>x<sub>2</sub></span>
|
||
</div>
|
||
</div>
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>118.4 135.2</span>
|
||
</div>
|
||
</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>−9</span><span>8.75</span>
|
||
<span>8</span><span>−7.5</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [x_1,x_2] = [118.4 135.2][-9,8.75~8,-7.5] -->
|
||
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>118.4×−9 + 135.2×8</span><span>118.4×8.75 + 135.2×−7.5</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [118.4*-9 +135.2*8,118.4*8.75 +135.2*-7.5] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>16</span><span>22</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [16,22] -->
|
||
|
||
|
||
|
||
<p>There were 16 children and 22 adults!</p>
|
||
<p>The answer almost appears like magic. But it is based on good mathematics.</p>
|
||
<div class="center80">
|
||
<p>Calculations like that (but using much larger matrices) help Engineers design buildings, are used in video games and computer animations to make things look 3-dimensional, and many other places.</p>
|
||
<p>It is also a way to solve <a href="systems-linear-equations.html">Systems of Linear Equations</a>.</p>
|
||
<p>The calculations are done by computer, but the people must understand the formulas.</p>
|
||
</div>
|
||
<p> </p>
|
||
<h2>Order is Important</h2>
|
||
<div class="example">
|
||
<p>Say that we are trying to find "X" in this case:</p>
|
||
<p class="center larger">AX = B</p>
|
||
<p><b>This is different to the example above!</b> X is now <b>after</b> A.</p>
|
||
<p>With matrices the order of multiplication usually changes the answer. Do not assume that AB = BA, it is almost never true.</p>
|
||
<p> </p>
|
||
<p>So how do we solve this one? Using the same method, but put A<sup>-1</sup> in front:</p>
|
||
<p class="center larger">A<sup>-1</sup>AX = A<sup>-1</sup>B</p>
|
||
<p>And we know that A<sup>-1</sup>A= I, so:</p>
|
||
<p class="center larger">IX = A<sup>-1</sup>B</p>
|
||
<p>We can remove I:</p>
|
||
|
||
<p class="center larger">X = A<sup>-1</sup>B</p>
|
||
<p>And we have our answer (assuming we can calculate A<sup>-1</sup>)</p>
|
||
</div>
|
||
<p><b>Why don't we try our bus and train example, but with the data set up that way around.</b></p>
|
||
<p>It can be done that way, but we must be careful how we set it up.</p>
|
||
<p>This is what it looks like as <span class="larger">AX = B</span>:</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3</span><span>3.2</span>
|
||
<span>3.5</span><span>3.6</span>
|
||
</div>
|
||
</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>x<sub>1</sub></span>
|
||
<span>x<sub>2</sub></span>
|
||
</div>
|
||
</div>
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>118.4</span>
|
||
<span>135.2</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [3,3.2~3.5,3.6][x_1~x_2] = [118.4~135.2] -->
|
||
|
||
|
||
<p>It looks so neat! I think I prefer it like this.</p>
|
||
<p class="center"><i>Also note how the rows and columns are swapped over<br>
|
||
("Transposed")
|
||
compared to the previous example.</i></p>
|
||
<p>To solve it we need the inverse of "A":</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3</span><span>3.2</span>
|
||
<span>3.5</span><span>3.6</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"><span class="inv">−1</span> = <span class="intbl"><em>1</em><strong>3×3.6−3.2×3.5</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3.6</span><span>−3.2</span>
|
||
<span>−3.5</span><span>3</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"></div>
|
||
</div>
|
||
<!-- [3,3.2~3.5,3.6] -1 = 1/3*3.6-3.2*3.5 [3.6,-3.2~-3.5,3] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>−9</span><span>8</span>
|
||
<span>8.75</span><span>−7.5</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"></div>
|
||
</div>
|
||
<!-- = [-9,8~8.75,-7.5] -->
|
||
|
||
|
||
<p class="center">
|
||
It is like the inverse we got before, but<br>
|
||
Transposed (rows and columns swapped over).</p>
|
||
<p>Now we can solve using:</p>
|
||
<p class="center"><span class="larger">X = A<sup>-1</sup>B</span></p>
|
||
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>x<sub>1</sub></span>
|
||
<span>x<sub>2</sub></span>
|
||
</div>
|
||
</div>
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>−9</span><span>8</span>
|
||
<span>8.75</span><span>−7.5</span>
|
||
</div>
|
||
</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>118.4</span>
|
||
<span>135.2</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [x_1~x_2] = [-9,8~8.75,-7.5][118.4~135.2] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>−9×118.4 + 8×135.2</span>
|
||
<span>8.75×118.4 − 7.5×135.2</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [-9*118.4 + 8*135.2~8.75*118.4 - 7.5*135.2] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">=</div>
|
||
<div class="mat">
|
||
<div class="cols1">
|
||
<span>16</span>
|
||
<span>22</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = [16~22] -->
|
||
|
||
|
||
|
||
<p>Same answer: 16 children and 22 adults.</p>
|
||
<p>So matrices are powerful things, but they do need to be set up correctly!</p>
|
||
<p> </p>
|
||
<h2>The Inverse May Not Exist</h2>
|
||
<p>First of all, to have an inverse the matrix must be "square" (same number of rows and columns).</p>
|
||
<p>But also the <b>determinant cannot be zero</b> (or we end up dividing by zero). How about this:</p>
|
||
|
||
<div style="text-align: center;">
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>3</span><span>4</span>
|
||
<span>6</span><span>8</span>
|
||
</div>
|
||
</div>
|
||
<div class="txt"><span class="inv">−1</span> = <span class="intbl"><em>1</em><strong>3×8−4×6</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>8</span><span>−4</span>
|
||
<span>−6</span><span>3</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- [3,4~6,8] -1 = 1/3*8-4*6 [8,-4~-6,3] -->
|
||
<br>
|
||
<div style="text-align: center;">
|
||
<div class="txt">= <span class="intbl"><em>1</em><strong>24−24</strong></span></div>
|
||
<div class="mat">
|
||
<div class="cols2">
|
||
<span>8</span><span>−4</span>
|
||
<span>−6</span><span>3</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- = 1/24-24 [8,-4~-6,3] -->
|
||
|
||
|
||
|
||
<p class="center"><b>24−24?</b> That equals 0, and <b>1/0 is undefined</b>.<br>
|
||
We cannot go any further!
|
||
This matrix has no Inverse.</p>
|
||
<p class="center larger">Such a matrix is called "Singular",<br>which only happens when the determinant is zero.</p>
|
||
<p>And it makes sense ... look at the numbers: the second row is just double the first row, and does <b>not add any new information</b>.</p>
|
||
<p>And the determinant <b>24−24</b> lets us know this fact.</p>
|
||
<p>(Imagine in our bus and train example that the prices on the train were all exactly 50% higher than the bus: so now we can't figure out any differences between adults and children. There needs to be something to set them apart.)</p>
|
||
<h2>Bigger Matrices</h2>
|
||
<p>The inverse of a 2x2 is <b>easy</b> ... compared to larger matrices (such as a 3x3, 4x4, etc).</p>
|
||
<p>For those larger matrices there are three main methods to work out the inverse:</p>
|
||
<ul>
|
||
<li><a href="matrix-inverse-row-operations-gauss-jordan.html">Inverse of a Matrix using Elementary Row Operations (Gauss-Jordan)</a></li>
|
||
<li><a href="matrix-inverse-minors-cofactors-adjugate.html">Inverse of a Matrix using Minors, Cofactors and Adjugate</a></li>
|
||
<li>Use a computer (such as the <a href="matrix-calculator.html">Matrix Calculator</a>)</li>
|
||
</ul>
|
||
<p> </p>
|
||
<h2>Conclusion</h2>
|
||
<ul>
|
||
<div class="bigul">
|
||
<li>The inverse of <span class="larger">A</span> is <span class="larger">A<sup>-1</sup></span> only when <span class="larger">AA<sup>-1</sup> = A<sup>-1</sup>A = <b>I</b></span></li>
|
||
<li>To find the inverse of a 2x2 matrix: <b>swap</b> the positions of a and d, put <b>negatives</b> in front of b and c, and <b>divide</b> everything by the determinant (ad-bc).</li>
|
||
<li>Sometimes there is no inverse at all</li>
|
||
</div>
|
||
</ul>
|
||
<p> </p>
|
||
<div class="questions">
|
||
<script>getQ(106, 2606, 2607, 2608, 2609, 2610, 2611, 2612);</script>
|
||
</div>
|
||
|
||
<div class="related">
|
||
<a href="matrix-multiplying.html">Multiplying Matrices</a>
|
||
<a href="matrix-determinant.html">Determinant of a Matrix</a>
|
||
<a href="matrix-calculator.html">Matrix Calculator</a>
|
||
<a href="index.html">Algebra Index</a>
|
||
</div>
|
||
<!-- #EndEditable -->
|
||
|
||
</article>
|
||
|
||
<div id="adend" class="centerfull noprint"></div>
|
||
<footer id="footer" class="centerfull noprint"></footer>
|
||
<div id="copyrt">Copyright © 2020 MathsIsFun.com</div>
|
||
|
||
</div>
|
||
</body><!-- #EndTemplate -->
|
||
<!-- Mirrored from www.mathsisfun.com/algebra/matrix-inverse.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:59:45 GMT -->
|
||
</html> |