Mathc matrices/c21y
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00b.c */
int main(void)
double ab[R4*C7]={
 1, -5, 3, -8, 2, +2, 0,
 3, -7, 1, -9, 8, 2, 0,
 3, -7, 1, -9, 9, 7, 0, 
 -1, 5, -3, 8, -2, -2, 0, 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(R4,C6,C1));
double **A = c_Ab_A_mR(Ab,i_mR(R4,C6));
double **b = c_Ab_b_mR(Ab,i_mR(R4,C1));
double **B = i_mR(R4,C3);
double **B_T = i_mR(R3,C4);
double **B_T_0 = i_Abr_Ac_bc_mR(R3,C4,C1);
 clrscrn();
 printf("Basis for a Column Space by Row Reduction :\n\n");
 printf(" A :");
 p_mR(A,S6,P1,C10);
 printf(" b :");
 p_mR(b,S6,P1,C10);
 printf(" Ab :");
 p_mR(Ab,S6,P1,C10);
 stop();
 clrscrn();
 printf(" The leading 1’s of R give the position \n"
 " of the columns of A which form a basis \n"
 " for the column space of A \n\n"
 " Ab :");
 p_mR(Ab,S7,P3,C10);
 printf(" R : gj_PP_mR(Ab,NO) :");
 gj_PP_mR(Ab,NO);
 p_mR(Ab,S7,P3,C10);
 ca_A_mR(ab,Ab); 
 c_c_mR(Ab,C1,B,C1);
 c_c_mR(Ab,C2,B,C2);
 c_c_mR(Ab,C5,B,C3);
 printf(" B : A basis for the column space of A");
 p_mR(B,S7,P3,C10); 
 stop(); 
 clrscrn();
 printf(" B : A basis for the column space of A");
 p_mR(B,S7,P3,C10); 
 printf(" B_T_0 : ");
 transpose_mR(B,B_T); 
 c_mR(B_T,B_T_0);
 p_mR(B_T_0,S7,P3,C10); 
 printf(" B_T_0 : Verify if B is a basis for the column space of A");
 gj_PP_mR(B_T_0,YES);
 p_mR(B_T_0,S7,P3,C10); 
 stop(); 
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 f_mR(B);
 f_mR(B_T);
 f_mR(B_T_0); 
 return 0;
/* ------------------------------------ */
La fonction transpose_mR(); vérifie la taille des matrices. 
 p_mR(B,S7,P3,C10); 
 printf(" B_T_0 : ");
 transpose_mR(B,B_T); 
 c_mR(B_T,B_T_0);
La fonction c_mR(); ne vérifie pas la taille des matrices. Cela me permet de créer le système B_T_0, ou 0 représente la matrice b.
double **B_T_0 = i_Abr_Ac_bc_mR(R3,C4,C1);
La création d'une matrice pour créer un systeme est la fonction i_Abr_Ac_bc_mR(A_R3,A_C4,b_C1), si vous utilisez i_mR(); la fonction gaussjordan de fonctionnera pas. 
 c_c_mR(Ab,C5,B,C3);
 c_c_mR(Ab,C3,B,C3); 
 c_c_mR(Ab,C4,B,C3);
Si vous remplacez C5 par C3 ou C4 vous pourrez observer que gaussjourdan vous dira que les vecteurs ne sont plus linéairement indépendants

Exemple de sortie écran :
Basis for a Column Space by Row Reduction :
 A :
 +1.0 -5.0 +3.0 -8.0 +2.0 +2.0 
 +3.0 -7.0 +1.0 -9.0 +8.0 +2.0 
 +3.0 -7.0 +1.0 -9.0 +9.0 +7.0 
 -1.0 +5.0 -3.0 +8.0 -2.0 -2.0 
 b :
 +0.0 
 +0.0 
 +0.0 
 +0.0 
 Ab :
 +1.0 -5.0 +3.0 -8.0 +2.0 +2.0 +0.0 
 +3.0 -7.0 +1.0 -9.0 +8.0 +2.0 +0.0 
 +3.0 -7.0 +1.0 -9.0 +9.0 +7.0 +0.0 
 -1.0 +5.0 -3.0 +8.0 -2.0 -2.0 +0.0 
 Press return to continue. 
 ------------------------------------ 
 The leading 1’s of R give the position 
 of the columns of A which form a basis 
 for the column space of A 
 Ab :
 +1.000 -5.000 +3.000 -8.000 +2.000 +2.000 +0.000 
 +3.000 -7.000 +1.000 -9.000 +8.000 +2.000 +0.000 
 +3.000 -7.000 +1.000 -9.000 +9.000 +7.000 +0.000 
 -1.000 +5.000 -3.000 +8.000 -2.000 -2.000 +0.000 
 R : gj_PP_mR(Ab,NO) :
 +1.000 -2.333 +0.333 -3.000 +2.667 +0.667 +0.000 
 -0.000 +1.000 -1.000 +1.875 +0.250 -0.500 -0.000 
 +0.000 +0.000 -0.000 +0.000 +1.000 +5.000 +0.000 
 +0.000 +0.000 +0.000 +0.000 +0.000 +0.000 +0.000 
 B : A basis for the column space of A
 +1.000 -5.000 +2.000 
 +3.000 -7.000 +8.000 
 +3.000 -7.000 +9.000 
 -1.000 +5.000 -2.000 
 Press return to continue. 
 ------------------------------------ 
 B : A basis for the column space of A
 +1.000 -5.000 +2.000 
 +3.000 -7.000 +8.000 
 +3.000 -7.000 +9.000 
 -1.000 +5.000 -2.000 
 B_T_0 : 
 +1.000 +3.000 +3.000 -1.000 +0.000 
 -5.000 -7.000 -7.000 +5.000 +0.000 
 +2.000 +8.000 +9.000 -2.000 +0.000 
 B_T_0 : Verify if B is a basis for the column space of A
 +1.000 +0.000 +0.000 -1.000 +0.000 
 +0.000 +1.000 +0.000 +0.000 +0.000 
 -0.000 -0.000 +1.000 -0.000 -0.000 
 Press return to continue.

Mathc matrices/c21z
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00c.c */
int main(void)
double ab[R4*C7]={
 1, -5, 3, -8, 2, +2, 0,
 5, -9, 6, -9, 6, 2, 0,
 5, -9, 6, -9, 6, 7, 0, 
 -1, 5, -3, 8, -2, -2, 0, 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(R4,C6,C1));
double **A = c_Ab_A_mR(Ab,i_mR(R4,C6));
double **b = c_Ab_b_mR(Ab,i_mR(R4,C1));
double **B = i_mR(R4,C3);
double **B_T = i_mR(R3,C4);
double **B_T_0 = i_Abr_Ac_bc_mR(R3,C4,C1);
 clrscrn();
 printf("Basis for a Column Space by Row Reduction :\n\n");
 printf(" A :");
 p_mR(A,S6,P1,C10);
 printf(" b :");
 p_mR(b,S6,P1,C10);
 printf(" Ab :");
 p_mR(Ab,S6,P1,C10);
 stop();
 clrscrn();
 printf(" The leading 1’s of R give the position \n"
 " of the columns of A which form a basis \n"
 " for the column space of A \n\n"
 " Ab :");
 p_mR(Ab,S7,P3,C10);
 printf(" R : gj_PP_mR(Ab,NO) :");
 gj_PP_mR(Ab,NO);
 p_mR(Ab,S7,P3,C10);
 ca_A_mR(ab,Ab); 
 c_c_mR(Ab,C1,B,C1);
 c_c_mR(Ab,C2,B,C2);
 c_c_mR(Ab,C5,B,C3);
 printf(" B : A basis for the column space of A");
 p_mR(B,S7,P3,C10); 
 stop(); 
 clrscrn();
 printf(" B : A basis for the column space of A");
 p_mR(B,S7,P3,C10); 
 printf(" B_T_0 : ");
 transpose_mR(B,B_T); 
 c_mR(B_T,B_T_0);
 p_mR(B_T_0,S7,P3,C10); 
 printf(" B_T_0 : Verify if B is a basis for the column space of A");
 gj_PP_mR(B_T_0,YES);
 p_mR(B_T_0,S7,P3,C10); 
 stop(); 
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 f_mR(B);
 f_mR(B_T);
 f_mR(B_T_0); 
 return 0;
/* ------------------------------------ */
La fonction transpose_mR(); vérifie la taille des matrices. 
 p_mR(B,S7,P3,C10); 
 printf(" B_T_0 : ");
 transpose_mR(B,B_T); 
 c_mR(B_T,B_T_0);
La fonction c_mR(); ne vérifie pas la taille des matrices. Cela me permet de créer le système B_T_0, ou 0 représente la matrice b.
double **B_T_0 = i_Abr_Ac_bc_mR(R3,C4,C1);
La création d'une matrice pour créer un systeme est la fonction i_Abr_Ac_bc_mR(A_R3,A_C4,b_C1), si vous utilisez i_mR(); la fonction gaussjordan de fonctionnera pas. 
 c_c_mR(Ab,C6,B,C3);
 c_c_mR(Ab,C3,B,C3); 
 c_c_mR(Ab,C4,B,C3);
 c_c_mR(Ab,C5,B,C3);
Si vous remplacez C6 par C3 C4 ou C5 vous pourrez observer que gaussjourdan vous dira que les vecteurs ne sont plus linéairement indépendants

Exemple de sortie écran :
Basis for a Column Space by Row Reduction :
 A :
 +1.0 -5.0 +3.0 -8.0 +2.0 +2.0 
 +5.0 -9.0 +6.0 -9.0 +6.0 +2.0 
 +5.0 -9.0 +6.0 -9.0 +6.0 +7.0 
 -1.0 +5.0 -3.0 +8.0 -2.0 -2.0 
 b :
 +0.0 
 +0.0 
 +0.0 
 +0.0 
 Ab :
 +1.0 -5.0 +3.0 -8.0 +2.0 +2.0 +0.0 
 +5.0 -9.0 +6.0 -9.0 +6.0 +2.0 +0.0 
 +5.0 -9.0 +6.0 -9.0 +6.0 +7.0 +0.0 
 -1.0 +5.0 -3.0 +8.0 -2.0 -2.0 +0.0 
 Press return to continue. 
 ------------------------------------ 
 The leading 1’s of R give the position 
 of the columns of A which form a basis 
 for the column space of A 
 Ab :
 +1.000 -5.000 +3.000 -8.000 +2.000 +2.000 +0.000 
 +5.000 -9.000 +6.000 -9.000 +6.000 +2.000 +0.000 
 +5.000 -9.000 +6.000 -9.000 +6.000 +7.000 +0.000 
 -1.000 +5.000 -3.000 +8.000 -2.000 -2.000 +0.000 
 R : gj_PP_mR(Ab,NO) :
 +1.000 -1.800 +1.200 -1.800 +1.200 +0.400 +0.000 
 -0.000 +1.000 -0.562 +1.938 -0.250 -0.500 -0.000 
 +0.000 +0.000 -0.000 +0.000 -0.000 +1.000 +0.000 
 +0.000 +0.000 +0.000 +0.000 +0.000 +0.000 +0.000 
 B : A basis for the column space of A
 +1.000 -5.000 +2.000 
 +5.000 -9.000 +2.000 
 +5.000 -9.000 +7.000 
 -1.000 +5.000 -2.000 
 Press return to continue. 
 ------------------------------------ 
 B : A basis for the column space of A
 +1.000 -5.000 +2.000 
 +5.000 -9.000 +2.000 
 +5.000 -9.000 +7.000 
 -1.000 +5.000 -2.000 
 B_T_0 : 
 +1.000 +5.000 +5.000 -1.000 +0.000 
 -5.000 -9.000 -9.000 +5.000 +0.000 
 +2.000 +2.000 +7.000 -2.000 +0.000 
 B_T_0 : Verify if B is a basis for the column space of A
 +1.000 +0.000 +0.000 -1.000 -0.000 
 +0.000 +1.000 +0.000 +0.000 +0.000 
 +0.000 +0.000 +1.000 +0.000 +0.000 
 Press return to continue.