# Cramer Rule via Calculus

# Preface

Last time I wrote about demographics, this time I will showcase a proof of the Cramer Rule via calculus, which I believe not to be published altogether.

# What is the Cramer Rule

Cramer’s Rule is a method in linear algebra used to solve systems of linear equations with as many equations as unknowns. Named after Gabriel Cramer, who published it in 1750, this rule provides an explicit formula for finding the solution using determinants of matrices.

# Basic Idea

Suppose you have a system of n linear equations with n unknowns, which can be written in matrix form as AX=B where:

- A is an n × n coefficient matrix.
- X is a column vector of the n unknowns.
- B is a column vector of the constants on the right-hand side of the equations.

## Cramer’s Rule

Cramer’s Rule gives an explicit formula for each unknown in terms of the determinants of matrices.

Specifically, if A is an invertible matrix det(A) ≠ 0, the solution for each unknown xᵢ can be found as:

Here:

- det(A) is the determinant of the matrix A.
- Aᵢ is the matrix formed by replacing the i-th column of A with the column vector B.

## Example

Let’s say you have a system of two equations:

In matrix form, this is:

The determinant of A is:

To find x:

Replace the first column of A with B:

Then

So,

Similarly, for y:

Replace the second column of A with B:

Then,

So,

## Limitations

**Cramer’s Rule is computationally expensive**for large systems because calculating determinants can be intensive.**It only works when the determinant of A is non-zero**, meaning the system has a unique solution.

# Formal Statement of the rule

A compact way to express the Cramer rule is

and this is exactly what we are going to proof via calculus

# Proof

## Step 1

The first step in the proof is to take the derivative of det(I+ tB) at t=0, where B is an n × n complex matrix and I is the identity matrix, to put if formally we have to expand

to simplify this expression, we will have first to expand det(I- tB) which is the characteristic polynomial.

Where each bᵢ is an eigenvalue of B.

Therefore, we have that

and so, we have

therefore, we have the very nice identity that

## Step 2

Secondly, we have to compute

Firstly, note that we have

which when evaluated in t=0 we have that

after induction in the dimension n of the matrices A and B we have the following identity

## Step 3

Notice that we have the following identity

and so we have in particular from Step 1 that

## Step 4

Comparing now the Step 2 and Step 3 we notice that

from which we can deduce that

which is exactly the Cramer Rule !