Matrix Determinant & Inverse and Number Base (Radix) Converter

Calculate matrix determinant, trace, and inverse alongside Binary, Hexadecimal, and Octal radix conversions.

Matrix Determinant (det A) & Binary/Hex Radix Representation det(A) = 14 • 0xFF (11111111₂) Matrix Inverse A⁻¹: [0.357, -0.143; -0.214, 0.286] • Trace(A) = 9
Determinant (ad − bc) 14
Inverse Matrix A⁻¹ [0.357, -0.143; -0.214, 0.286]
Binary (Base-2 of 255) 0b11111111
Inputs
Try:
Row 1, Column 1.
Row 1, Column 2.
Row 2, Column 1.
Row 2, Column 2.
Non-negative integer to convert across bases.
Results & Graph
Matrix Determinant (det A) & Binary/Hex Radix Representation
det(A) = 14 • 0xFF (11111111₂)
Matrix Inverse A⁻¹: [0.357, -0.143; -0.214, 0.286] • Trace(A) = 9
Determinant (ad − bc)
14
Inverse Matrix A⁻¹
[0.357, -0.143; -0.214, 0.286]
Binary (Base-2 of 255)
0b11111111
Hexadecimal (Base-16) / Octal
0xFF / 0o377

Matrix Invariants: |Determinant| vs. |Trace|

Comparison of matrix determinant and diagonal trace magnitude
Graph 1 • Parallelogram Spanned by Matrix Column Vectors Area of transformed unit square equals |det(A)|
2D Linear Transformation of Unit Square • Column Vector 1: (4, 3) • Column Vector 2: (2, 5) • Parallelogram Area |det(A)| = 14.00 • Trace tr(A) = a₁₁ + a₂₂ = 9.00
Graph 2 • 8-Bit Binary Register & Positional Powers of 2 Shows active bits (2⁷ down to 2⁰), Hex, and Octal representations
1 2^7 (128) 1 2^6 (64) 1 2^5 (32) 1 2^4 (16) 1 2^3 (8) 1 2^2 (4) 1 2^1 (2) 1 2^0 (1) Decimal: 255 • Binary: 0b11111111 • Hex: 0xFF • Octal: 0o377
Graph 3 • Determinant, Trace & Frobenius Norm Comparison Key linear algebra invariants of Matrix A
Determinant |det(A)| 14.00 Matrix Trace tr(A) = a₁₁ + a₂₂ 9.00 Frobenius Norm √(Σ a_ij²) 7.35
Summary: Matrix determinant is 14 and 255 in binary is 11111111.
Summary: The 2×2 matrix [[4, 2], [3, 5]] has determinant det(A) = 14, trace = 9, and inverse [0.357, -0.143; -0.214, 0.286]. Converting decimal 255 across bases yields binary 0b11111111, hexadecimal 0xFF, and octal 0o377.
Interactive chart & math engine powered by CalculatorGraph

Formula: 2×2 Matrix Cramer Inversion & Positional Radix Expansion

det(A) = a11a22 − a12a21,   A−1 = 1det(A) a22−a12−a21a11
det(A) = a₁₁a₂₂ − a₁₂a₂₁; A⁻¹ = (1 / det(A)) × [a₂₂, −a₁₂; −a₂₁, a₁₁]
  • det(A): Area scaling factor of the linear transformation (invertible iff det(A) ≠ 0)

Rounding: Matrix inverse entries round to 3 decimal places.

Worked example: Matrix [[4, 2], [3, 5]] and Radix Conversion of 255

Find determinant and inverse of [[4, 2], [3, 5]] and convert 255 to binary and hex.

  1. det(A) = (4 × 5) − (2 × 3) = 20 − 6 = 14; Trace = 4 + 5 = 9.
  2. Inverse A⁻¹ = (1/14) × [[5, −2], [−3, 4]] = [[0.357, −0.143], [−0.214, 0.286]].
  3. 255 in binary = 0b11111111, hex = 0xFF, octal = 0o377.
Result: det(A) = 14, Trace = 9, and 255 = 0xFF (11111111₂).

Frequently Asked Questions

When does a square matrix fail to have an inverse?

A matrix is singular (non-invertible) when its determinant equals zero, meaning its rows or columns are linearly dependent.

Does the order I type the four entries matter?

Yes, for the inverse. The boxes are labelled by position: top-left, top-right, bottom-left, bottom-right. Entering by columns transposes the matrix, which leaves det(A) = 14 and the trace of 9 unchanged at the defaults but transposes the inverse, so the off-diagonal values -0.143 and -0.214 swap places.

Why does the inverse times the original not give exactly the identity?

Each inverse entry is rounded to three decimals. For the default, 0.357 × 4 plus -0.143 × 3 comes to 0.999 rather than 1. The exact inverse is one fourteenth of [[5, -2], [-3, 4]]. Keep that fractional form if you need to multiply back without drift.

Can I use decimals or negative numbers in the matrix?

Yes. The matrix entries accept any real number. [[3, 0], [0, -2]] gives a determinant of -6 and an inverse of [0.333, 0; 0, -0.5]. Only the integer box for base conversion restricts its input, by truncating fractions and replacing negatives with zero.

What does the trace tell me?

The trace is the sum of the diagonal entries, 9 for the default matrix. It equals the sum of the eigenvalues, while the determinant equals their product. With trace 9 and determinant 14 the eigenvalues are 2 and 7, which you can confirm by solving the quadratic built from those two numbers.

How do I convert a negative number to binary here?

You cannot. The integer is clamped to zero if it is negative, so the output shows 0 in every base without warning. Signed binary needs a chosen bit width, such as 8 or 16 bits, and a two's complement step. Work that out separately or use a programmer's calculator that offers it.

Is there a limit on how large an integer I can convert?

Not a hard one, but accuracy ends at 2 to the power 53. Past that point the value is stored as a floating-point double and neighbouring integers become indistinguishable, so the hex and binary digits can be for a slightly different number. For 64-bit identifiers or keys use an arbitrary-precision tool.

Why is 255 a common test value?

It is the largest number that fits in one byte, eight bits all set to one. That makes it easy to recognise in each base: 0b11111111, 0xFF and 0o377. It appears in colour codes, subnet masks and byte dumps, so it is a natural default for checking that a converter behaves.

Does a determinant of zero always show the Singular Matrix message?

When the arithmetic lands exactly on zero, yes, as with [[2, 4], [1, 2]]. With decimal entries floating-point rounding can occasionally leave a tiny nonzero leftover, and then the page would print a huge inverse instead. If the inverse looks enormous, check whether one row is a multiple of the other.

Can this page solve a system of two linear equations?

Indirectly. Put the coefficients into the matrix, read the inverse, and multiply it by your right-hand side vector. With the default matrix and b = (6, 8), the exact solution is x = 1 and y = 1, because 4 + 2 = 6 and 3 + 5 = 8. The rounded inverse will reproduce that to about three decimals.

Why are hex letters shown in capitals?

The converter upper-cases hexadecimal digits, so 255 appears as 0xFF and 10 as 0xA. Case does not change the value, and most programming languages accept either. If your code style uses lower case, the digits are otherwise identical and you can paste them in after changing the case.

What does a determinant of 14 mean geometrically?

Treat the matrix as a transformation of the plane. A unit square is mapped to a parallelogram whose area is the absolute value of the determinant, so the default matrix stretches areas by a factor of 14. A positive sign means orientation is kept. A zero determinant would flatten the square onto a line, which is why no inverse exists then.

Can I convert from hex or binary back to decimal here?

No. The integer box only takes a decimal whole number and converts it outward to the other three bases. To go the other way, multiply each digit by its place value and add, for example 0xFF is 15 × 16 plus 15. Many programming languages and spreadsheet functions will also parse a hex string directly.

A 2x2 matrix and a base converter, side by side

Five boxes drive this page. Four of them are the entries of a 2x2 matrix, read row by row as a₁₁, a₁₂, a₂₁ and a₂₂. The fifth is a whole number to rewrite in binary, hexadecimal and octal. The two jobs are independent: editing the matrix never changes the base conversion and editing the integer never touches the matrix.

With the defaults, the matrix is [[4, 2], [3, 5]] and the integer to convert is 255, the largest value one byte can hold. The headline reads det(A) = 14 next to 0xFF (11111111₂), and the lines below give the inverse [0.357, -0.143; -0.214, 0.286], the binary form 0b11111111 and the pair 0xFF / 0o377. Trace = 9 appears in the sublabel.

Every calculation runs in ordinary double-precision floating point rather than arbitrary-precision arithmetic. For everyday matrices and integers that makes no difference, but it does matter for very large integers, which are covered further down.

Checking det(A) = 14 and the trace by hand

For a 2x2 matrix the determinant is the top-left times the bottom-right, minus the top-right times the bottom-left. At the defaults that is 4 × 5 minus 2 × 3, or 20 minus 6, which is 14. The trace is simply the sum of the diagonal, 4 plus 5, giving 9.

Change the top-left entry and you can watch both move. Set a₁₁ to 2 and the determinant becomes 2 × 5 minus 6, which is 4, while the trace drops to 7. Set it to 6 and the determinant rises to 24 with a trace of 11. Each unit added to a₁₁ adds a₂₂, here 5, to the determinant and exactly 1 to the trace.

A negative determinant is perfectly valid. The permutation matrix [[0, 1], [1, 0]] returns det(A) = -1, and [[3, 0], [0, -2]] returns -6. The sign tells you the transformation flips orientation, like a mirror; the size of the number tells you how much it scales area.

Reading the inverse and its three decimal places

The inverse swaps the two diagonal entries, changes the sign of the two off-diagonal entries, and divides everything by the determinant. For the default that is (1/14) × [[5, -2], [-3, 4]], which the page prints as [0.357, -0.143; -0.214, 0.286]. The semicolon separates the first row from the second.

Those entries are rounded to three decimal places, so multiplying them back against the original matrix will give something close to the identity but not exact. 0.357 × 4 + (-0.143) × 3 is 0.999, not 1. If you need exact values, keep the fraction form: one fourteenth of [[5, -2], [-3, 4]].

Matrices with a determinant that divides cleanly give tidier results. With a₁₁ set to 2 the determinant is 4 and the inverse is [1.25, -0.5; -0.75, 0.5], which is exact. With a₁₁ set to 6 the inverse is [0.208, -0.083; -0.125, 0.25], where the first two entries are rounded and the last two are exact. The identity matrix [[1, 0], [0, 1]] returns itself as its inverse, a quick sanity check that the page is reading your entries in the right order.

When the inverse line says Singular Matrix

If the determinant comes out exactly zero, the inverse line is replaced by Singular Matrix (det = 0, no inverse). That happens when one row is a multiple of the other. [[2, 4], [1, 2]] is an example: the top row is twice the bottom row, the determinant is 2 × 2 minus 4 × 1, which is 0, and the page correctly refuses to invert it.

Decimal entries are handled too. [[0.1, 0.2], [0.3, 0.6]] is singular for the same reason, and in our run the engine still reported a determinant of 0 rather than a tiny floating-point leftover. Do not rely on that for every decimal matrix, though. The test is an exact comparison with zero, so a matrix that is singular in theory can sometimes produce a determinant like 0.0000000001 and receive a huge, meaningless inverse. If the inverse entries look enormous, check whether your rows are proportional.

A determinant that is merely small, not zero, is a warning sign in practice. The inverse exists, but its entries will be large and sensitive to rounding in the inputs.

How 255 becomes 0xFF, 11111111 and 0o377

The base converter takes the integer and writes it with positional digits in each base. 255 is one less than 2 to the power 8, so in binary it is eight ones, shown as 0b11111111 on the page. In hexadecimal each digit covers four binary digits, so two F digits, 0xFF, carry the same value. Octal groups binary digits in threes, and 255 becomes 0o377: 3 × 64 plus 7 × 8 plus 7.

The prefixes follow common programming conventions: 0b for binary, 0x for hexadecimal and 0o for octal. Hex letters are printed in upper case. The headline also shows the binary digits with a subscript 2 after them, which is the maths textbook way of marking the base.

Small values make a useful check. Enter 0 and every base shows 0. Enter 10 and the hex reads 0xA. These are the ones people get wrong most often when converting by hand, and the converter handles them without fuss.

Reading the output the other way is a good habit. Each hex digit is worth sixteen times the one to its right, so 0xFF is 15 × 16 plus 15, which is 255 again. Each octal digit is worth eight times its right-hand neighbour. Doing one reverse check like that takes seconds and catches the occasional typo in the integer box, which is far more likely than the converter being wrong.

Negative, fractional and very large integers

The converter quietly changes some inputs before it starts. A negative number is replaced with 0, so entering -5 shows 0x0 and 0b0 with no message. If you need a negative value in binary, the page will not give you a signed or two's complement form; you would need to choose a bit width and work that out separately.

Fractions are cut off, not rounded. Enter 10.9 and the result is for 10, giving 0xA. There is no fixed-point or floating-point binary output for the part after the decimal point.

Very large integers are the real limit. The engine stores the number as a standard double, which represents every whole number exactly only up to 2 to the power 53. Above that, nearby integers collapse onto the same value, so the binary, hex and octal digits you see may belong to a neighbouring number. For checksums, cryptographic keys or 64-bit identifiers, use a tool that works with arbitrary-precision integers.

Mistakes that give the wrong matrix answer

The most common slip is entering the matrix column by column instead of row by row. For the default that would turn [[4, 2], [3, 5]] into [[4, 3], [2, 5]]. The determinant is the same, 14, because transposing never changes it, and the trace is the same too. The inverse is not: it comes out transposed. If you are checking homework, compare the off-diagonal entries of the inverse against your own working to catch this.

Another is mixing up a₁₂ and a₂₁ labels in a textbook that indexes from zero. The page labels them by position, Top-Right and Bottom-Left, so follow the position rather than the subscript in your source.

Finally, the page only handles 2x2 matrices. A 3x3 problem cannot be squeezed into these boxes, and taking the determinant of a corner block is not the determinant of the whole matrix.

A last check worth doing: the determinant of the inverse should be one over the determinant of the original. For the default, one over 14 is about 0.0714, and the printed inverse gives 0.357 × 0.286 minus 0.143 × 0.214, which is close to that once rounding is allowed for.

Where these two results get used

The matrix half is aimed at linear algebra coursework and quick checks: does a 2x2 system have a unique solution, and what is the inverse needed to solve it? A nonzero determinant such as the default 14 says yes, and the inverse lets you solve A x = b by multiplying b by A⁻¹. For a 2x2 system that is often faster than elimination by hand.

The trace and determinant together also give the two eigenvalues of a 2x2 matrix, since they are the roots of λ² minus trace times λ plus determinant. For the default that is λ² minus 9λ plus 14, whose roots are 2 and 7. The page does not print eigenvalues, but it hands you both coefficients.

The base converter suits programming and networking work: reading colour codes, bit masks, file permissions written in octal, or a byte value such as 255 that shows up as FF in a hex dump.

For coursework, the most useful pattern is to work the problem by hand first and use the page only to confirm. Write the determinant, form the adjugate by swapping and negating, divide, and then compare against the printed inverse. If your answer and the page differ only in the third decimal place, the difference is rounding. If they differ in sign or position, you have probably swapped two entries.