---
title: "Determinant Invariant on a 2x2 Integer Grid Under Row/Col Operations"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-olympiad-nt-w1-invariants-2x2-grid-shear"
board: "Olympiad"
grade: "Olympiad"
published_at: "2026-12-01T16:30:00+05:30"
---

# Determinant Invariant on a 2x2 Integer Grid Under Row/Col Operations

Four integers are arranged in a $2 \times 2$ grid:
$$\begin{pmatrix} 17 & 23 \\ 11 & 15 \end{pmatrix}.$$
In one move, you may choose any row and add an integer multiple of it, entry-by-entry, to the other row; OR choose any column and add an integer multiple of it, entry-by-entry, to the other column. After a sequence of moves, the grid becomes
$$\begin{pmatrix} 25 & 11 \\ 18 & x \end{pmatrix}.$$
Find the integer $x$.

## Textbook Solution

For any $2 \times 2$ grid $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$, define the cross-difference (determinant)
$$\Delta = ad - bc.$$
Verify that $\Delta$ is invariant under every allowed move:
1. Adding $k$ times Row $1$ to Row $2$ yields $\begin{pmatrix} a & b \\ c + ka & d + kb \end{pmatrix}$, whose cross-difference is:
   $$a(d + kb) - b(c + ka) = ad + kab - bc - kab = ad - bc = \Delta.$$
   By symmetry, adding $k$ times Row $2$ to Row $1$ also preserves $\Delta$.
2. Adding $k$ times Column $1$ to Column $2$ yields $\begin{pmatrix} a & b + ka \\ c & d + kc \end{pmatrix}$, whose cross-difference is:
   $$a(d + kc) - (b + ka)c = ad + kac - bc - kac = ad - bc = \Delta.$$
   Similarly, adding $k$ times Column $2$ to Column $1$ preserves $\Delta$.

Compute the initial invariant:
$$\Delta_{\text{init}} = 17 \times 15 - 23 \times 11 = 255 - 253 = 2.$$
Compute the final invariant:
$$\Delta_{\text{final}} = 25x - 11 \times 18 = 25x - 198.$$
Equating $\Delta_{\text{final}} = \Delta_{\text{init}}$:
$$25x - 198 = 2 \implies 25x = 200 \implies x = 8.$$
(Indeed, both grids have $\gcd$ of entries equal to $1$ and determinant $2$, so one is reachable from the other via $SL_2(\mathbb{Z})$ row/column operations.)

## Vedic Shortcut

Whenever a grid or pair of vectors transforms by adding a multiple of one row/column to another, **area / determinant $ad - bc$ is strictly conserved** (the geometric shear principle!).
- Initial area: $17(15) - 23(11) = 255 - 253 = 2$.
- Final area: $25x - 198 = 2 \implies 25x = 200 \implies x =$ **$8$**.

## Common Mistakes

- **Using the sum $a+b+c+d$ or row sums**: Adding a multiple of one row to another changes the total sum, so sums are not invariant.
- **Confusing $ad - bc$ with $ac - bd$**: Swapping the pairing of diagonal entries breaks the shear invariance.