Show there exist square matrices A,B with AB ≠ BA
We will use explicit 2×2 matrices and several independent checks.
Notation: matrices over ℤ (integers), standard matrix product. “Commutative” would require AB = BA for all A,B — which is false.
We will use explicit 2×2 matrices and several independent checks.
Notation: matrices over ℤ (integers), standard matrix product. “Commutative” would require AB = BA for all A,B — which is false.
Not commutative. A concrete counterexample is A = [[1,2],[0,1]] and B = [[1,0],[3,1]], for which AB = [[7,2],[3,1]] but BA = [[1,2],[3,7]], so AB ≠ BA.
Compute AB and BA for the fixed A,B above.
Sample 300 random pairs with entries in −3..3 (not all zero). Report how many satisfy AB = BA.
Enumerate all 2×2 matrices with entries in {0,1} (except both zero simultaneously for all entries) and count commuting pairs.
Identity I, zero 0, and scalars λI commute with everything; diagonal matrices commute with each other.
Compute [A,B]=AB-BA for the counterexample; nonzero commutator certifies non-commutativity.
Paste A and B as four comma-separated rows each. Example:
A: 1,2; 0,1B: 1,0; 3,1
Apply the two shears to a sample of points in both orders. The sets differ, showing the compositions differ.