Technology & Engineering

Cramer's rule

Cramer's rule is a method used to solve systems of linear equations. It involves using determinants to find the values of the variables in the system. This method is particularly useful when there are only a few variables in the system.

Written by Perlego with AI-assistance

4 Key excerpts on "Cramer's rule"

  • Book cover image for: Numerical Methods with Chemical Engineering Applications
    2.4 Cramer’s Rule Now that we know if we are going to run into a problem solving a linear algebra prob-lem, let’s get down to the business of actually solving these equations. One way to solve a linear system is through determinants, in a method known as Cramer’s rule. As we will see, this approach is only useful for small systems, but it is the most elegant math-ematical approach. This should teach you probably the most important lesson you can learn in numerical methods – sometimes the most beautiful mathematical method is a terrible numerical method. In Cramer’s rule, the solution of Ax = b is given by x i = det A i det A (2.4.1) 2.4 Cramer’s Rule 57 where A i is the same as A except that the i th column is replaced with b , A i = ⎡ ⎢ ⎢ ⎢ ⎣ a 11 · · · a 1, i − 1 b 1 a 1, i + 1 · · · a 1 n a 21 · · · a 2, i − 1 b 2 a 2, i + 1 · · · a 2 n . . . . . . . . . . . . . . . a n 1 · · · a n , i − 1 b n a n , i + 1 · · · a nn ⎤ ⎥ ⎥ ⎥ ⎦ (2.4.2) Cramer’s rule gives you yet another way to see how the determinant of A tells you if a solution exists and is unique. If det A = 0, then there is no solution or infinitely many solutions and Eq. ( 2.4.1 ) yields nonsense. Applying Cramer’s rule to a 2 × 2 system yields a nice formula that is worth remembering. We know that det A = a 11 a 22 − a 12 a 21 (2.4.3) We then compute det A 1 = det b 1 a 12 b 2 a 22 = b 1 a 22 − b 2 a 12 (2.4.4) and det A 2 = det a 11 b 1 a 21 b 2 = a 11 b 2 − a 21 b 1 (2.4.5) If we use these results with Cramer’s rule ( 2.4.1 ), we get x 1 = b 1 a 22 − b 2 a 12 a 11 a 22 − a 12 a 21 (2.4.6) x 2 = a 11 b 2 − a 21 b 1 a 11 a 22 − a 12 a 21 (2.4.7) Cramer’s rule is best for small systems because the number of calculations required scales like n ! for n 1. How big is n ! ? For a 100 × 100 matrix, the number of operations is approximately 100 ! ≈ 10 158 . If you had an exoflop computer with 10 18 operations per second, it would take 10 140 seconds to compute the determinant.
  • Book cover image for: Mathematical Methods in the Physical Sciences
    • Mary L. Boas(Author)
    • 2011(Publication Date)
    • Wiley
      (Publisher)
    Section 3 Determinants; Cramer’s Rule 93 Without even evaluating it, we should recognize by Fact 2c that it is zero. Then proceeding with the Laplace development of (3.5) using the first row gives just D = ( − 1)( − 2) − 3 7 3 − 1 = 2(3 − 21) = − 36 as above. Now you may be wondering why you should learn about this when your computer will do it for you. Suppose you have a determinant with elements which are algebraic expressions, and you want to write it in a different form. Then you need to know what manipulations you can do without changing its value. Also, if you know the rules, you may see that a determinant is zero without evaluating it. An easy way to learn these things is to evaluate some simple numerical determinants by hand. Cramer’s Rule This is a formula in terms of determinants for the solution of n linear equations in n unknowns when there is exactly one solution. As we said for row reduction and for evaluating determinants, your computer will quickly give you the solution of a set of linear equations when there is one. However, for theoretical purposes, we need the Cramer’s rule formula, and a simple way to learn about it is to use it to solve sets of linear equations with numerical coefficients. Let us first show the use of Cramer’s rule to solve two equations in two unknowns. Then we will generalize it to n equations in n unknowns. Consider the set of equations (3.6) a 1 x + b 1 y = c 1 , a 2 x + b 2 y = c 2 . If we multiply the first equation by b 2 , the second by b 1 , and then subtract the results and solve for x , we get (if a 1 b 2 − a 2 b 1 = 0) (3.7a) x = c 1 b 2 − c 2 b 1 a 1 b 2 − a 2 b 1 . Solving for y in a similar way, we get (3.7b) y = a 1 c 2 − a 2 c 1 a 1 b 2 − a 2 b 1 . Using the definition (3.1) of a second order determinant, we can write the solutions (3.7) of (3.6) in the form (3.8) x = c 1 b 1 c 2 b 2 a 1 b 1 a 2 b 2 , y = a 1 c 1 a 2 c 2 a 1 b 1 a 2 b 2 .
  • Book cover image for: Precalculus, Enhanced Edition
    • David Cohen, Theodore Lee, David Sklar, , David Cohen, Theodore Lee, David Sklar(Authors)
    • 2016(Publication Date)
    After typing in the entries in cells B2 through E5, the formula =MDETERM(B2:E5) is used to compute the determinant. (See your user’s manual.) *The rule is named after one of its discoverers, the Swiss mathematician Gabriel Cramer (1704–1752). Copyright 201 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it. 5 Using Cramer’s Rule to Solve a System Use Cramer’s rule to find all solutions of the following system of equations: First we list the determinants D , D x , D y , and D z : The calculations for evaluating D begin as follows: Subtract twice the second row from the first. Subtract 4 times the second row from the third. Since we now have two zeros in the first column, it is an easy matter to expand D along that column to obtain The value of D is therefore 55. (Since this value is nonzero, Cramer’s rule does apply.) As Exercise 37 at the end of this section asks you to verify, the values of the other three determinants are By Cramer’s rule, then, the unique values of x , y , and z that satisfy the system are One way we can prove Cramer’s rule is to use Gaussian elimination to solve the system (1) A much shorter and simpler proof, however, has been found by D. E. Whitford and M. S. Klamkin.* This is the proof we give here; it makes effective use of the rules employed in this section for manipulating determinants.
  • Book cover image for: Linear Algebra: Gateway to Mathematics
    7.4. Cramer’s Rule 313 Theorem 7.13 ensures that det ? ≠ 0 . Once we recognize that ? 𝑗𝑖 = (adj ?) [𝑖𝑗] , we have ?( 1 det ? adj ?) = 1 det ? ?(adj ?) = 1 det ? (det ?)? = ?. The result follows by the miracle theorem, Miracle 5.13. Your admiration of this elegant formula for the inverse of a matrix should be tem-pered by the computational complexity of evaluating it. Even for a 3×3 matrix such as in the following example, this formula involves determinants of one 3 × 3 matrix and nine 2 × 2 matrices. Quick Example: Use Theorem 7.15 to compute the inverse of the 3 × 3 matrix ? = [ 1 0 2 −1 3 0 0 3 1 ]. We first compute the determinants of the nine submatrices: det ? 11 = 3, det ? 12 = −1, det ? 13 = −3, det ? 21 = −6, det ? 22 = 1, det ? 23 = 3, det ? 31 = −6, det ? 32 = 2, det ? 33 = 3. Then det ? = 1 det ? 11 −0 det ? 12 +2 det ? 13 = 1⋅3−0⋅(−1)+2⋅(−3) = −3 . The 𝑖𝑗 -entry of adj ? is the 𝑗𝑖 -cofactor (−1) 𝑗+𝑖 det ? 𝑗𝑖 . So ? −1 = 1 det ? adj ? = 1 −3 ⎡ ⎢ ⎢ ⎣ 3 6 −6 1 1 −2 −3 −3 3 ⎤ ⎥ ⎥ ⎦ = ⎡ ⎢ ⎢ ⎢ ⎣ −1 −2 2 − 1 3 − 1 3 2 3 1 1 −1 ⎤ ⎥ ⎥ ⎥ ⎦ . We can use Theorem 7.15 to derive an explicit formula for solving a system of ? equations in ? unknowns when there is a unique solution. 7.16 Cramer’s Rule: Suppose ? is a nonsingular ? × ? matrix and ? = [ ? 1 ⋮ ? ? ] is a vector in ℝ ? . Then the solution ? = [ ? 1 ⋮ ? ? ] ∈ ℝ ? of the system ?? = ? is given by ? 𝑗 = 1 det ? det ? 𝑗 where ? 𝑗 is the matrix obtained by replacing the 𝑗 th column of ? with ? . 314 Chapter 7. Determinants Proof: Let ? 𝑖𝑗 be the 𝑖𝑗 -cofactor of ? . We know that ? = ? −1 ? = 1 det ? (adj ?)? = 1 det ? ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ? 11 ⋯ ? ?1 ⋮ ⋮ ? 1𝑗 ⋯ ? ?𝑗 ⋮ ⋮ ? 1? ⋯ ? ?? ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ [ ? 1 ⋮ ? ? ]. Thus, ? 𝑗 = 1 det ? ? ∑ 𝑖=1 ? 𝑖𝑗 ? 𝑖 = 1 det ? ? ∑ 𝑖=1 (−1) 𝑖+𝑗 ? 𝑖 det ? 𝑖𝑗 = 1 det ? det ? 𝑗 since by Theorem 7.8 the sum is the expansion of det ? 𝑗 along its 𝑗 th column. Quick Example: Use Cramer’s Rule to find the solution of the system 3? + ? = 4 2? − 2? = 1.
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.