Mathc matrices/c20z
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00h.c */
void fun(void)
double a[R2*C2]={ 1,2,
 3,4}; 
double b[R2*C2]={-1,0,
 3,2};
double **A = ca_A_mR(a,i_mR(R2,C2));
double **B = ca_A_mR(b,i_mR(R2,C2)); 
 clrscrn();
 printf(" Cosine of the Angle Between Vectors in M_2x2 :\n\n"); 
 printf(" A :");
 p_mR(A,S3,P0,C6);
 printf(" B :");
 p_mR(B,S3,P0,C6);
 printf(" <A,B> = %.0f \n\n", dot_TR_R(A,B));
 printf(" ||A|| = %.4f = %.4f\n\n", norm_TR_R(A),sqrt(30));
 printf(" ||B|| = %.4f = %.4f\n\n", norm_TR_R(B),sqrt(14));
 printf(" cos(alpha) = %.4f \n\n", 
 dot_TR_R(A,B)
 (norm_TR_R(A)*norm_TR_R(B)));
 f_mR(A);
 f_mR(B);
/* ------------------------------------ */
int main(void)
 fun();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Cosine of the Angle Between Vectors in M_2x2 :
 A :
 +1 +2 
 +3 +4 
 B :
 -1 +0 
 +3 +2 
 <A,B> = 16 
 ||A|| = 5.4772 = 5.4772
 ||B|| = 3.7417 = 3.7417
 cos(alpha) = 0.7807 
 Press return to continue
 Press X to stop

Mathc matrices/c21a
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00h.c */
void fun(void)
double a[R2*C2]={ 2,0,
 0,3};
double u[R2*C1]={ 1,
 1};
double v[R2*C1]={ 3,
 2}; 
double **A = ca_A_mR(a,i_mR(R2,C2));
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
 clrscrn();
 printf(" Cosine of the Angle Between Vectors U and V :\n\n"); 
 printf(" A :");
 p_mR(A,S3,P0,C6);
 printf(" U :");
 p_mR(U,S3,P0,C6);
 printf(" V :");
 p_mR(V,S3,P0,C6);
 printf(" <U,V> = %.0f \n\n", dot_Diag_R(A,U,V));
 printf(" ||U|| = %.4f \n\n", norm_Diag_R(A,U));
 printf(" ||V|| = %.4f \n\n", norm_Diag_R(A,V));
 printf(" cos(alpha) = %.4f \n\n", 
 dot_Diag_R(A,U,V)
 ( norm_Diag_R(A,U) * norm_Diag_R(A,V) )); 
 f_mR(A);
 f_mR(U);
 f_mR(V);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Cosine of the Angle Between Vectors U and V :
 A :
 +2 +0 
 +0 +3 
 U :
 +1 
 +1 
 V :
 +3 
 +2 
 <U,V> = 12 
 ||U|| = 2.2361 
 ||V|| = 5.4772 
 cos(alpha) = 0.9798 
 Press return to continue.

Mathc matrices/c10f
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00h.c */
void fun(void)
double a[R2*C2]={ 9,8,
 5,3};
double u[R2*C1]={ 9,
 8};
double v[R2*C1]={ 7,
 2}; 
double **A = ca_A_mR(a,i_mR(R2,C2));
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
 clrscrn();
 printf(" Cosine of the Angle Between Vectors U and V :\n\n");
 printf(" A :");
 p_mR(A,S3,P0,C6);
 printf(" U :");
 p_mR(U,S3,P0,C6);
 printf(" V :");
 p_mR(V,S3,P0,C6);
 printf(" <U,V> = %.0f \n\n", dot_Au_R(A,U,V));
 printf(" ||U|| = %.4f \n\n", norm_Au_R(A,U));
 printf(" ||V|| = %.4f \n\n", norm_Au_R(A,V));
 printf(" cos(alpha) = %.4f \n\n", 
 dot_Au_R(A,U,V)
 ( norm_Au_R(A,U) * norm_Au_R(A,V) )); 
 f_mR(A);
 f_mR(U);
 f_mR(V);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Cosine of the Angle Between Vectors U and V :
 A :
 +9 +8 
 +5 +3 
 U :
 +9 
 +8 
 V :
 +7 
 +2 
 <U,V> = 14284 
 ||U|| = 160.5802 
 ||V|| = 89.0056 
 cos(alpha) = 0.9994 
 Press return to continue.

Mathc matrices/e050c
Application
Mathc matrices/c21b
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun(void)
double u[R2*C1]={ 1,
 1};
double v[R2*C1]={ 3,
 2}; 
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
 clrscrn();
 printf(" U :");
 p_mR(U,S3,P0,C6);
 printf(" V :");
 p_mR(V,S3,P0,C6);
 printf(" <U,V> = V^t U \n");
 printf(" <U,V> = %.0f \n", dot_uv_R(U,V));
 printf(" <V,U> = %.0f \n\n", dot_uv_R(V,U));
 f_mR(U);
 f_mR(V);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 U :
 +1 
 +1 
 V :
 +3 
 +2 
 <U,V> = V^t U 
 <U,V> = 5 
 <V,U> = 5 
 Press return to continue.

Mathc matrices/c21c
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00b.c */
void fun(void)
double v[R2*C1]={ 3,
 2}; 
double w[R2*C1]={ 0,
 -1};
double k = 3; 
double **V = ca_A_mR(v, i_mR(R2,C1));
double **kV = smul_mR(k,V,i_mR(R2,C1));
double **W = ca_A_mR(w, i_mR(R2,C1));
 clrscrn();
 printf(" V :");
 p_mR(V,S3,P0,C6); 
 printf(" W :");
 p_mR(W,S3,P0,C6);
 printf(" %.0f V :",k);
 p_mR(kV,S3,P0,C6); 
 printf(" <kV,W> = k<V,W> [Homogeneity axiom] \n\n");
 printf(" <kV,W> = %.0f \n", dot_uv_R(kV,W));
 printf(" k<V,W> = %.0f \n\n", k*dot_uv_R( V,W));
 f_mR(V);
 f_mR(kV);
 f_mR(W);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 V :
 +3 
 +2 
 W :
 +0 
 -1 
 3 V :
 +9 
 +6 
 <kV,W> = k<V,W> [Homogeneity axiom] 
 <kV,W> = -6 
 k<V,W> = -6 
 Press return to continue.

Mathc matrices/c21d
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00c.c */
void fun(void)
double u[R2*C1]={ 1,
 1};
double v[R2*C1]={ 3,
 2}; 
double w[R2*C1]={ 0,
 -1};
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
double **W = ca_A_mR(w,i_mR(R2,C1));
double **UplsV = add_mR(U,V,i_mR(R2,C1));
 clrscrn();
 printf(" U :");
 p_mR(U,S3,P0,C6); 
 printf(" V :");
 p_mR(V,S3,P0,C6); 
 printf(" W :");
 p_mR(W,S3,P0,C6); 
 printf(" UplsV :");
 p_mR(UplsV,S3,P0,C6); 
 stop();
 clrscrn(); 
 printf(" <U+V,W> = <U,W>+<V,W> [Additivity axiom] \n\n");
 printf(" <u+v,w> = %.0f \n", dot_uv_R(UplsV,W));
 printf(" <u,w>+<v,w> = %.0f \n\n", dot_uv_R(U, W)+
 dot_uv_R(V, W));
 f_mR(U);
 f_mR(V);
 f_mR(W);
 f_mR(UplsV); 
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 U :
 +1 
 +1 
 V :
 +3 
 +2 
 W :
 +0 
 -1 
 UplsV :
 +4 
 +3 
 Press return to continue. 
 ------------------------------------ 
 <U+V,W> = <U,W>+<V,W> [Additivity axiom] 
 <u+v,w> = -3 
 <u,w>+<v,w> = -3 
 Press return to continue.

Mathc matrices/c21e
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00d.c */
void fun(void)
double v[R2*C1]={ 3,
 2}; 
double **V = ca_A_mR(v,i_mR(R2,C1));
 clrscrn();
 printf(" V :");
 p_mR(V,S3,P0,C6);
 printf(" ||u|| = sqrt(%.0f) \n\n", dot_uv_R(V,V));
 f_mR(V);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 V :
 +3 
 +2 
 ||u|| = sqrt(13) 
 Press return to continue.

Mathc matrices/c21f
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00e.c */
void fun(void)
double u[R2*C1]={ 1,
 1};
double v[R2*C1]={ 3,
 2}; 
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
 clrscrn();
 printf(" U :");
 p_mR(U,S3,P0,C6);
 printf(" V :");
 p_mR(V,S3,P0,C6);
 printf(" d(U,V) = ||U-V|| = (<U-V,U-V>)^1/2 \n\n");
 printf(" d(U,V) = %.3f \n", dist_uv_R(U,V));
 printf(" d(V,U) = %.3f \n\n", dist_uv_R(V,U)); 
 f_mR(U);
 f_mR(V);
/* ------------------------------------ */
int main(void)
 fun();
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 U :
 +1 
 +1 
 V :
 +3 
 +2 
 d(U,V) = ||U-V|| = (<U-V,U-V>)^1/2 
 d(U,V) = 2.236 
 d(V,U) = 2.236 
 Press return to continue.