Mathc matrices/c24r
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c03c.c */
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
double a[RA*CA]={
 +3, -4, -2, 
 +5, -3, -1,
 +4, -3, -1 
double x_B[RX*CX]={
 +1,
 +2, 
 +3 
double b[RA*CA]={
 +1, +2, +6, 
 +3, +4, +1,
 +5, +5, +2 
double **A = ca_A_mR(a, i_mR(RA,CA));
double **B = ca_A_mR(b, i_mR(RA,CA));
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **invB = inv_mR(B, i_mR(RA,CA));
double **invBA = i_mR(RA,CA);
double **D = i_mR(RA,CA);
double **DX_B = i_mR(RA,CX);
 clrscrn();
 printf(" In the the B basis\n\n"
 " Find [T(x)]_B = D*x_B \n\n"
 " D = InvB*A*B ");
 mul_mR(invB,A,invBA); 
 mul_mR(invBA,B,D);
 p_mR(D,S6,P2,C7); 
 printf(" x_B : ");
 p_mR(X_B,S6,P2,C7);
 printf(" D*x_B");
 p_mR(mul_mR(D,X_B,DX_B),S7,P2,C7);
 stop(); 
 f_mR(A);
 f_mR(X_B);
 f_mR(B);
 f_mR(invB); 
 f_mR(invBA); 
 f_mR(D);
 f_mR(DX_B);
 return 0;
/* ------------------------------------ */
 Calculons [T(x)]_B = D* [x]_B

Exemple de sortie écran :
 In the the B basis
 Find [T(x)]_B = D*x_B 
 D = InvB*A*B 
 +2.45 +1.52 -9.03 
 -3.48 -2.17 +13.34 
 -2.41 -2.86 -1.28 
 x_B : 
 +1.00 
 +2.00 
 +3.00 
 D*x_B
 -21.62 
 +32.21 
 -11.97 
 Press return to continue.

Mathc matrices/c24v
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c04c.c */
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
double a[RA*CA]={
 +3, -4, -2, -1,
 +5, -3, -0, -2, 
 +6, -0, -3, -2,
 +3, -3, -1, -3 
double x_B[RX*CX]={
 +1,
 +2, 
 +3, 
 +4 
double b[RA*CA]={
 +1, +2, +6, +6, 
 +3, +2, +1, +6,
 +5, +5, +3, +6,
 +5, +5, +2, +4, 
double **A = ca_A_mR(a, i_mR(RA,CA));
double **B = ca_A_mR(b, i_mR(RA,CA));
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **invB = inv_mR(B, i_mR(RA,CA));
double **invBA = i_mR(RA,CA);
double **D = i_mR(RA,CA);
double **DX_B = i_mR(RA,CX);
 clrscrn();
 printf(" In the the B basis\n\n"
 " Find [T(x)]_B = D*x_B \n\n"
 " D = InvB*A*B ");
 mul_mR(invB,A,invBA); 
 mul_mR(invBA,B,D);
 p_mR(D,S9,P2,C7); 
 printf(" x_B : ");
 p_mR(X_B,S9,P2,C7);
 printf(" D*x_B");
 p_mR(mul_mR(D,X_B,DX_B),S9,P2,C7);
 stop(); 
 f_mR(A);
 f_mR(X_B);
 f_mR(B);
 f_mR(invB); 
 f_mR(invBA); 
 f_mR(D);
 f_mR(DX_B);
 return 0;
/* ------------------------------------ */
 Calculons [T(x)]_B = D* [x]_B

Exemple de sortie écran :
 In the the B basis
 Find [T(x)]_B = D*x_B 
 D = InvB*A*B 
 -115.00 -89.00 -118.00 -304.00 
 +107.00 +82.20 +112.40 +289.20 
 -48.00 -37.80 -50.60 -126.80 
 +27.50 +22.40 +33.80 +77.40 
 x_B : 
 +1.00 
 +2.00 
 +3.00 
 +4.00 
 D*x_B
 -1863.00 
 +1765.40 
 -782.60 
 +483.30 
 Press return to continue.

Mathc matrices/c24o
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c02d.c */
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
double a[RA*CA]={
 +3, -2, 
 +2, -2
double x_B[RX*CX]={
 +1, 
 +2
double b[RA*CA]={
 +2, +4, 
 +3, +5
double **A = ca_A_mR(a, i_mR(RA,CA));
double **B = ca_A_mR(b, i_mR(RA,CA));
double **D = i_mR(RA,CA) ;
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **X = mul_mR(B,X_B, i_mR(RX,CX));
double **T = i_mR(RA,CX) ;
double **invB = inv_mR(B, i_mR(RA,CA));
double **invBA = i_mR(RA,CA) ;
double **DX_B = i_mR(RA,CX) ;
/* D = invB*A*B */
 mul_mR(invB,A,invBA); 
 mul_mR(invBA,B,D);
/* [T(x)]_B = D*x_B */ 
 mul_mR(D,X_B,DX_B); 
 clrscrn(); 
 printf(" In the Standard basis\n\n"
 " T(x) = A*x");
 p_mR(mul_mR(A,X,T),S4,P2,C7);
 printf(" In the the B basis with D = invB*A*B\n\n"
 " [T(x)]_B = D*x_B");
 p_mR(DX_B,S4,P2,C7); 
 printf(" Verify the result if it is the same in the two basis :\n\n"
 " With B*[x_B] = [x] then B*[D*x_B] = [A*x]\n\n"
 " B*[D*x_B]");
 p_mR(mul_mR(B,DX_B,T),S4,P2,C7); 
 stop();
 f_mR(A);
 f_mR(B);
 f_mR(D); 
 f_mR(X_B);
 f_mR(X);
 f_mR(T); 
 f_mR(invB); 
 f_mR(invBA); 
 f_mR(DX_B);
 return 0;
/* ------------------------------------ */
 Vérifions si les résultats sont compatibles

Exemple de sortie écran :
 In the Standard basis
 T(x) = A*x
+4.00 
-6.00 
 In the the B basis with D = invB*A*B
 [T(x)]_B = D*x_B
-22.00 
+12.00 
 Verify the result if it is the same in the two basis :
 With B*[x_B] = [x] then B*[D*x_B] = [A*x]
 B*[D*x_B]
+4.00 
-6.00 
 Press return to continue.

Mathc matrices/c24s
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c03d.c */
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
double a[RA*CA]={
 +3, -4, -2, 
 +5, -3, -1,
 +4, -3, -1 
double x_B[RX*CX]={
 +1,
 +2, 
 +3 
double b[RA*CA]={
 +1, +2, +6, 
 +3, +4, +1,
 +5, +5, +2 
double **A = ca_A_mR(a, i_mR(RA,CA));
double **B = ca_A_mR(b, i_mR(RA,CA));
double **D = i_mR(RA,CA) ;
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **X = mul_mR(B,X_B, i_mR(RX,CX));
double **T = i_mR(RA,CX) ;
double **invB = inv_mR(B, i_mR(RA,CA));
double **invBA = i_mR(RA,CA) ;
double **DX_B = i_mR(RA,CX) ;
/* D = invB*A*B */
 mul_mR(invB,A,invBA); 
 mul_mR(invBA,B,D);
/* [T(x)]_B = D*x_B */ 
 mul_mR(D,X_B,DX_B); 
 clrscrn(); 
 printf(" In the Standard basis\n\n"
 " T(x) = A*x");
 p_mR(mul_mR(A,X,T),S8,P2,C7);
 printf(" In the the B basis with D = invB*A*B\n\n"
 " [T(x)]_B = D*x_B");
 p_mR(DX_B,S8,P2,C7); 
 printf(" Verify the result if it is the same in the two basis :\n\n"
 " With B*[x_B] = [x] then B*[D*x_B] = [A*x]\n\n"
 " B*[D*x_B]");
 p_mR(mul_mR(B,DX_B,T),S8,P2,C7); 
 stop();
 f_mR(A);
 f_mR(B);
 f_mR(D); 
 f_mR(X_B);
 f_mR(X);
 f_mR(T); 
 f_mR(invB); 
 f_mR(invBA); 
 f_mR(DX_B);
 return 0;
/* ------------------------------------ */
 Vérifions si les résultats sont compatibles

Exemple de sortie écran :
 In the Standard basis
 T(x) = A*x
 -29.00 
 +52.00 
 +29.00 
 In the the B basis with D = invB*A*B
 [T(x)]_B = D*x_B
 -21.62 
 +32.21 
 -11.97 
 Verify the result if it is the same in the two basis :
 With B*[x_B] = [x] then B*[D*x_B] = [A*x]
 B*[D*x_B]
 -29.00 
 +52.00 
 +29.00 
 Press return to continue.

Mathc matrices/c24w
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c04d.c */
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
double a[RA*CA]={
 +3, -4, -2, -1,
 +5, -3, -0, -2, 
 +6, -0, -3, -2,
 +3, -3, -1, -3 
double x_B[RX*CX]={
 +1,
 +2, 
 +3, 
 +4 
double b[RA*CA]={
 +1, +2, +6, +6, 
 +3, +2, +1, +6,
 +5, +5, +3, +6,
 +5, +5, +2, +4, 
double **A = ca_A_mR(a, i_mR(RA,CA));
double **B = ca_A_mR(b, i_mR(RA,CA));
double **D = i_mR(RA,CA) ;
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **X = mul_mR(B,X_B, i_mR(RX,CX));
double **T = i_mR(RA,CX) ;
double **invB = inv_mR(B, i_mR(RA,CA));
double **invBA = i_mR(RA,CA) ;
double **DX_B = i_mR(RA,CX) ;
/* D = invB*A*B */
 mul_mR(invB,A,invBA); 
 mul_mR(invBA,B,D);
/* [T(x)]_B = D*x_B */ 
 mul_mR(D,X_B,DX_B); 
 clrscrn(); 
 printf(" In the Standard basis\n"
 " T(x) = A*x");
 p_mR(mul_mR(A,X,T),S4,P0,C7);
 printf(" In the the B basis with D = invB*A*B\n"
 " [T(x)]_B = D*x_B");
 p_mR(DX_B,S4,P0,C7); 
 printf(" Verify the result if it is the same in the two basis :\n\n"
 " With B*[x_B] = [x] then B*[D*x_B] = [A*x]\n"
 " B*[D*x_B]");
 p_mR(mul_mR(B,DX_B,T),S4,P0,C7); 
 stop();
 f_mR(A);
 f_mR(B);
 f_mR(D); 
 f_mR(X_B);
 f_mR(X);
 f_mR(T); 
 f_mR(invB); 
 f_mR(invBA); 
 f_mR(DX_B);
 return 0;
/* ------------------------------------ */
 Vérifions si les résultats sont compatibles