Determinants – How to Calculate the Determinants for a 2×2 Matrix

In order to calculate the determinant for a matrix, it must be a square matrix, with equal rows and columns.  The easiest square matrix to find the determinant is one that is 2×2.   See Kelley’s Algebra pg. 121-122.  Below, we will use his problem 5 and put it in J.    The matrix is  cross multiplied:

 a         b

 c         d      =    a times d minus c times b = the determinant.  In J it’s as follows:

P5 2x2 Cross


As you can see, we can calculate two different ways.  You can use  separate cross multiplication steps  using the scan multiply (*/) verb.

Then, do the subtraction (_9 – _12).

Or, we can do it all in one step using parentheses (9 * _1) – (3*_4)

 Then, you can also check your work with the determinant command or verb (DET =: – / . *)

These 2×2 matrices are simple enough to do in pencil and paper but, if your arithmetic skills are unreliable, you have several ways to check your work.

Next, let’s experiment with  Kelley’s Problem 5 and turn it into an actual system of equations.

9x – 4y = 13

3x – 1y =   9    

As in Helzer’s  Matrix divide, we take the variables to the left of the equal signs, which in fact are the original 2×2 matrix and assign the first column to x and the second column to y in Matrix A.  Then we use the assignments to the right of the equal sign as Vector B below.  The Determinant remains unchanged because the variables in A remain the same.

P5 2x2 Helzer



First, we use Matrix Divide (% .) to solve the matrix for x,y  (7.66667 or 7 2/3, 14).  Then, we use the DET verb to find and confirm  the determinant for A.

Note that 7.66667 = 7  2/3 but that the % division operator always gives a decimal amount.  I’ll explain fractions and the (r) operator in a future post.

Here is another example of the same kind of problem taken from the  site. This is Example 2 from their site on how to use determinants and Cramer’s rule to solve a system of equations:

x   –   3y   =   6

2x +  3y   =   3

We will use J Matrix divide and DET instead:









If you check the answers at the link, you will see that the answers for x,y (3, -1) and the DET (9) are the same as with J.

Next math post, 3 x 3 determinants.



About Richard Rollo

I am a retired Community College Instructor. I taught Political Science 1 American Government for 22 years in Southern California. I am originally from Northern Minnesota. My earliest years were spent in the living quarters of a rural Duluth Winnipeg & Pacific Railway Depot. Then my family joined the great 1950's migration to Southern California where I joined up with fellow baby boomers in overcrowded schools.
This entry was posted in APL and J, Do It Yourself Learning, Dr. Kenneth Iverson, Learning Math, Self Education. Bookmark the permalink.