Metamath Proof Explorer


Theorem cramerimp

Description: One direction of Cramer's rule (according to Wikipedia "Cramer's rule", 21-Feb-2019, https://en.wikipedia.org/wiki/Cramer%27s_rule : "[Cramer's rule] ... expresses the solution [of a system of linear equations] in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the column vector of right-hand sides of the equations."): The ith component of the solution vector of a system of linear equations equals the determinant of the matrix of the system of linear equations with the ith column replaced by the righthand side vector of the system of linear equations divided by the determinant of the matrix of the system of linear equations. (Contributed by AV, 19-Feb-2019) (Revised by AV, 1-Mar-2019)

Ref Expression
Hypotheses cramerimp.a A=NMatR
cramerimp.b B=BaseA
cramerimp.v V=BaseRN
cramerimp.e E=1ANmatRepVRZI
cramerimp.h H=XNmatRepVRYI
cramerimp.x ·˙=RmaVecMulNN
cramerimp.d D=NmaDetR
cramerimp.q ×˙=/rR
Assertion cramerimp RCRingINXBYVX·˙Z=YDXUnitRZI=DH×˙DX

Proof

Step Hyp Ref Expression
1 cramerimp.a A=NMatR
2 cramerimp.b B=BaseA
3 cramerimp.v V=BaseRN
4 cramerimp.e E=1ANmatRepVRZI
5 cramerimp.h H=XNmatRepVRYI
6 cramerimp.x ·˙=RmaVecMulNN
7 cramerimp.d D=NmaDetR
8 cramerimp.q ×˙=/rR
9 crngring RCRingRRing
10 9 adantr RCRingINRRing
11 10 3ad2ant1 RCRingINXBYVX·˙Z=YDXUnitRRRing
12 eqid BaseR=BaseR
13 7 1 2 12 mdetf RCRingD:BBaseR
14 13 adantr RCRingIND:BBaseR
15 14 3ad2ant1 RCRingINXBYVX·˙Z=YDXUnitRD:BBaseR
16 1 2 matrcl XBNFinRV
17 16 simpld XBNFin
18 17 adantr XBYVNFin
19 10 18 anim12i RCRingINXBYVRRingNFin
20 19 3adant3 RCRingINXBYVX·˙Z=YDXUnitRRRingNFin
21 ne0i INN
22 9 21 anim12ci RCRingINNRRing
23 22 anim1i RCRingINXBYVNRRingXBYV
24 23 3adant3 RCRingINXBYVX·˙Z=YDXUnitRNRRingXBYV
25 simpl X·˙Z=YDXUnitRX·˙Z=Y
26 25 3ad2ant3 RCRingINXBYVX·˙Z=YDXUnitRX·˙Z=Y
27 1 2 3 6 slesolvec NRRingXBYVX·˙Z=YZV
28 24 26 27 sylc RCRingINXBYVX·˙Z=YDXUnitRZV
29 simpr RCRingININ
30 29 3ad2ant1 RCRingINXBYVX·˙Z=YDXUnitRIN
31 eqid 1A=1A
32 1 2 3 31 ma1repvcl RRingNFinZVIN1ANmatRepVRZIB
33 20 28 30 32 syl12anc RCRingINXBYVX·˙Z=YDXUnitR1ANmatRepVRZIB
34 4 33 eqeltrid RCRingINXBYVX·˙Z=YDXUnitREB
35 15 34 ffvelcdmd RCRingINXBYVX·˙Z=YDXUnitRDEBaseR
36 simpr X·˙Z=YDXUnitRDXUnitR
37 36 3ad2ant3 RCRingINXBYVX·˙Z=YDXUnitRDXUnitR
38 eqid UnitR=UnitR
39 eqid R=R
40 12 38 8 39 dvrcan3 RRingDEBaseRDXUnitRDERDX×˙DX=DE
41 11 35 37 40 syl3anc RCRingINXBYVX·˙Z=YDXUnitRDERDX×˙DX=DE
42 simpl RCRingINRCRing
43 42 3ad2ant1 RCRingINXBYVX·˙Z=YDXUnitRRCRing
44 12 38 unitcl DXUnitRDXBaseR
45 44 adantl X·˙Z=YDXUnitRDXBaseR
46 45 3ad2ant3 RCRingINXBYVX·˙Z=YDXUnitRDXBaseR
47 12 39 crngcom RCRingDEBaseRDXBaseRDERDX=DXRDE
48 43 35 46 47 syl3anc RCRingINXBYVX·˙Z=YDXUnitRDERDX=DXRDE
49 48 oveq1d RCRingINXBYVX·˙Z=YDXUnitRDERDX×˙DX=DXRDE×˙DX
50 18 adantl RCRingINXBYVNFin
51 42 adantr RCRingINXBYVRCRing
52 29 adantr RCRingINXBYVIN
53 50 51 52 3jca RCRingINXBYVNFinRCRingIN
54 53 3adant3 RCRingINXBYVX·˙Z=YDXUnitRNFinRCRingIN
55 1 3 4 7 cramerimplem1 NFinRCRingINZVDE=ZI
56 54 28 55 syl2anc RCRingINXBYVX·˙Z=YDXUnitRDE=ZI
57 41 49 56 3eqtr3rd RCRingINXBYVX·˙Z=YDXUnitRZI=DXRDE×˙DX
58 1 2 3 4 5 6 7 39 cramerimplem3 RCRingINXBYVX·˙Z=YDXRDE=DH
59 58 3adant3r RCRingINXBYVX·˙Z=YDXUnitRDXRDE=DH
60 59 oveq1d RCRingINXBYVX·˙Z=YDXUnitRDXRDE×˙DX=DH×˙DX
61 57 60 eqtrd RCRingINXBYVX·˙Z=YDXUnitRZI=DH×˙DX