AC : 
+2.552146353 +3.238937890 -0.367848775 
+3.640966506 +4.513108698 -0.325010660 
-0.632761552 -0.555686939 +0.106612824 
 CA : 
+2.552146353 +3.238937890 -0.367848775 
+3.640966506 +4.513108698 -0.325010660 
-0.632761552 -0.555686939 +0.106612824 
 Press return to continue. 
 BC : 
-1.851440740 -1.895923694 +0.458981779 
-2.141191966 -3.071767768 -0.025622332 
+0.702008327 +0.055244725 -0.700775560 
 CB : 
-1.851440740 -1.895923694 +0.458981779 
-2.141191966 -3.071767768 -0.025622332 
+0.702008327 +0.055244725 -0.700775560 
 Press return to continue. 
 AD : 
-1.886277766 -2.516668484 +0.217875173 
-2.826274812 -3.389745271 +0.312729795 
+0.399186093 +0.507068843 +0.092223690 
 DA : 
-1.886277766 -2.516668484 +0.217875173 
-2.826274812 -3.389745271 +0.312729795 
+0.399186093 +0.507068843 +0.092223690 
 Press return to continue. 
 BD : 
+1.111771847 +1.730090428 +0.162231310 
+1.930202575 +2.052534715 -0.491409408 
+0.150221221 -0.694361059 -0.607969126 
 DB : 
+1.111771847 +1.730090428 +0.162231310 
+1.930202575 +2.052534715 -0.491409408 
+0.150221221 -0.694361059 -0.607969126 
 Press return to continue. 
 CD : 
-19.763973297 -25.001913517 +1.887303670 
-28.066399361 -34.617771858 +3.352390871 
+3.588481645 +5.344669131 +0.210979191 
 DC : 
-19.763973297 -25.001913517 +1.887303670 
-28.066399361 -34.617771858 +3.352390871 
+3.588481645 +5.344669131 +0.210979191 
 Press return to continue
 Press X to stop

Mathc matrices/c33 2a
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* Save as : c02a.c */
void fun(int r)
double **A = i_mR(r,r);
double **A_2 = i_mR(r,r);
double **B = i_mR(r,r);
double **B_2 = i_mR(r,r);
double **AplsB = i_mR(r,r);
double **AplsB_2 = i_mR(r,r);
double **AB = i_mR(r,r);
double **AB2 = i_mR(r,r);
double **T1 = i_mR(r,r);
double **T2 = i_mR(r,r);
 r_commute2_mR(A,B,9);
 clrscrn();
 printf(" A : ");
 p_mR(A,S5,P3,C6); 
 printf(" B : ");
 p_mR(B,S5,P3,C6); 
 stop();
 clrscrn(); 
 printf(" (A+B)**2 :\n");
 add_mR(A,B,AplsB);
 pow_mR(2,AplsB,AplsB_2);
 p_mR(AplsB_2,S8,P3,C6); 
 printf(" A**2 + 2*AB + B**2 :\n");
 pow_mR(2,A,A_2); 
 mul_mR(A,B,AB);
 smul_mR(2,AB,AB2);
 pow_mR(2,B,B_2);
 add_mR(A_2,AB2,T1);
 add_mR(T1,B_2,T2);
 p_mR(T2,S8,P3,C6);
 f_mR(A);
 f_mR(A_2);
 f_mR(B);
 f_mR(B_2);
 f_mR(AplsB);
 f_mR(AplsB_2);
 f_mR(AB);
 f_mR(AB2);
 f_mR(T1);
 f_mR(T2);
/* ------------------------------------ */
void hello(void)
 printf("\n ");
 printf("\n Commutative matrices ");
 printf("\n ");
 printf("\n (A+B)**2 = A** + 2*AB + B**2 ");
 printf("\n ********************** \n");
 printf("\n\n ");
 printf("\n \n");
 stop();
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 hello();
do
 fun(RC5);
} while(stop_w());
 return 0;
/*------------------------------------ */
Exemple de sortie écran :
 A : 
+4.707 -11.338 +8.209 -9.622 +17.082 
-2.071 +3.802 -3.334 +4.022 -6.420 
+0.570 -0.986 +0.033 -0.617 +1.849 
+1.115 -2.084 +1.672 -2.464 +3.269 
-2.568 +5.536 -3.969 +4.724 -8.904 
 B : 
-15.646 +34.640 -25.598 +30.217 -51.352 
+9.909 -21.643 +15.871 -19.648 +32.179 
+1.375 -4.980 +3.641 -4.775 +5.650 
-4.343 +7.980 -6.116 +7.082 -13.228 
+8.107 -17.779 +12.952 -15.749 +26.457 
 Press return to continue. 
 (A+B)**2 :
 +12.147 -25.871 +19.084 -22.706 +38.065 
 -8.050 +18.635 -13.063 +16.453 -26.393 
 -1.941 +6.235 -3.789 +5.893 -7.451 
 +2.809 -4.751 +3.746 -3.538 +8.394 
 -6.258 +14.009 -10.140 +12.530 -19.949 
 A**2 + 2*AB + B**2 :
 +12.147 -25.871 +19.084 -22.706 +38.065 
 -8.050 +18.635 -13.063 +16.453 -26.393 
 -1.941 +6.235 -3.789 +5.893 -7.451 
 +2.809 -4.751 +3.746 -3.538 +8.394 
 -6.258 +14.009 -10.140 +12.530 -19.949 
 Press return to continue
 Press X to stop

Mathc matrices/c33 2b
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* Save as : c02b.c */
void fun(int r)
double **A = i_mR(r,r);
double **A_2 = i_mR(r,r);
double **B = i_mR(r,r);
double **B_2 = i_mR(r,r);
double **AplsB = i_mR(r,r);
double **AplsB_2 = i_mR(r,r);
double **AB = i_mR(r,r);
double **BA = i_mR(r,r);
double **T1 = i_mR(r,r);
double **T2 = i_mR(r,r);
 r_mR(A,9);
 r_mR(B,9);
 clrscrn();
 printf(" A : ");
 p_mR(A,S5,P3,C6); 
 printf(" B : ");
 p_mR(B,S5,P3,C6); 
 stop();
 clrscrn(); 
 printf(" (A+B)**2 :\n");
 add_mR(A,B,AplsB);
 pow_mR(2,AplsB,AplsB_2);
 p_mR(AplsB_2,S8,P3,C6); 
 printf(" (A+B)**2 = A**2 + AB + BA + B**2 :\n");
 pow_mR(2,A,A_2); 
 mul_mR(A,B,AB);
 mul_mR(B,A,BA); 
 pow_mR(2,B,B_2);
 add_mR(A_2,AB,T1);
 add_mR(T1,BA,T2);
 add_mR(T2,B_2,T1);
 p_mR(T1,S8,P3,C6);
 f_mR(A);
 f_mR(A_2);
 f_mR(B);
 f_mR(B_2);
 f_mR(AplsB);
 f_mR(AplsB_2);
 f_mR(AB);
 f_mR(BA);
 f_mR(T1);
 f_mR(T2);
/* ------------------------------------ */
void hello(void)

printf("\n ");
 printf("\n (A+B)**2 = A**2 + AB + BA + B**2 ");
 printf("\n ************************** \n");
 printf("\n\n ");
 printf("\n \n");
 stop();
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 hello();
do
 fun(RC5);
} while(stop_w());
 return 0;
/*------------------------------------ */
Exemple de sortie écran :
 A : 
+1.000 -3.000 +1.000 -3.000 +1.000 
+4.000 -7.000 +3.000 +5.000 -3.000 
+9.000 -3.000 +7.000 +2.000 -6.000 
+9.000 +9.000 +8.000 -7.000 -9.000 
-2.000 -4.000 +7.000 +9.000 +4.000 
 B : 
-5.000 +9.000 -9.000 +1.000 +2.000 
-3.000 +9.000 -9.000 -8.000 +7.000 
-8.000 -6.000 +4.000 +4.000 -9.000 
-1.000 -9.000 -1.000 +5.000 -3.000 
-6.000 +2.000 -5.000 +9.000 -2.000 
 Press return to continue.

(A+B)**2 :
 -26.000 +54.000 -100.000 +0.000 +162.000 
 -64.000 +56.000 -99.000 +34.000 +145.000 
+166.000 -81.000 +179.000 -191.000 -300.000 
 +55.000 +9.000 -25.000 -186.000 -81.000 
+160.000 -74.000 +228.000 +34.000 -274.000 
 (A+B)**2 = A**2 + AB + BA + B**2 :
 -26.000 +54.000 -100.000 +0.000 +162.000 
 -64.000 +56.000 -99.000 +34.000 +145.000 
+166.000 -81.000 +179.000 -191.000 -300.000 
 +55.000 +9.000 -25.000 -186.000 -81.000 
+160.000 -74.000 +228.000 +34.000 -274.000 
 Press return to continue
 Press X to stop

Mathc matrices/c33 2c
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* Save as : c02c.c */
void fun(int r)
double **A = r_mR(i_mR(r,r),9);
double **A_2 = i_mR(r,r);
double **B = r_mR(i_mR(r,r),9);
double **B_2 = i_mR(r,r);
double **AplsB = i_mR(r,r);
double **AplsB_2 = i_mR(r,r);
double **AB = i_mR(r,r);
double **AB2 = i_mR(r,r);
double **T1 = i_mR(r,r);
double **T2 = i_mR(r,r);
 clrscrn();
 printf(" A : ");
 p_mR(A,S5,P3,C6); 
 printf(" B : ");
 p_mR(B,S5,P3,C6); 
 stop();
 clrscrn(); 
 printf("(A+B)**2 :\n");
 add_mR(A,B,AplsB);
 pow_mR(2,AplsB,AplsB_2);
 p_mR(AplsB_2,S8,P3,C6); 
 printf(" (A+B)**2 != A**2 + 2*AB + B**2 :\n");
 pow_mR(2,A,A_2); 
 mul_mR(A,B,AB);
 smul_mR(2,AB,AB2);
 pow_mR(2,B,B_2);
 add_mR(A_2,AB2,T1);
 add_mR(T1,B_2,T2);
 p_mR(T2,S8,P3,C6);
 f_mR(A);
 f_mR(A_2);
 f_mR(B);
 f_mR(B_2);
 f_mR(AplsB);
 f_mR(AplsB_2);
 f_mR(AB);
 f_mR(AB2);
 f_mR(T1);
 f_mR(T2);
/* ------------------------------------ */
void hello(void)
 printf("\n ");
 printf("\n None commutative matrices ");
 printf("\n ");
 printf("\n (A+B)**2 != A**2 + 2*AB + B**2 ");
 printf("\n ********************** \n");
 printf("\n\n ");
 printf("\n \n");
 stop();
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 hello();
do
 fun(RC5);
} while(stop_w());
 return 0;
/*------------------------------------ */