public static int Test_UnitVector_UnitVector()
        {
            UnitVector uv = new UnitVector("e1", 3);

            HtmlOutputMethods.WriteLatexEqToHtmlAndLaunch(uv.ToLatex("F"), "Test_UnitVector_UnitVector.html");

            return(0);
        }
        public static int Test_UnitVector_Multiply_ElementaryMatrix()
        {
            /*
             * e'r * Eij = e'r * ei * e'j = &ri *e'j where & = Kronecker delta
             *
             */
            StringBuilder    sb  = new StringBuilder();
            ElementaryMatrix E12 = new ElementaryMatrix(4, 4, "E12");      // 4 x 4 ElementaryMatrix
            UnitVector       e1  = new UnitVector("e1", 4);                //Order four unit vector e1
            UnitVector       e2  = new UnitVector("e2", 4, RowColumn.Row); //Order four row unit vector e2
            UnitVector       er  = new UnitVector("e3", 4, RowColumn.Row); //Order four unit row vector e3 our er above

            /*
             * i = 1, j = 2, r = 3
             */

            sb.Append(@"e'_rE_{ij} = e'_re_ie'_j = \delta_{r j}e'j \\");
            //Test matrix unit vector * Elementary Matrix,  er * Eij
            UnitVector uvE1 = er * E12;

            sb.Append(@"e'_3E_{12} = " + uvE1.ToLatex() + @"\;");

            //Test e'r * ei * e'j
            UnitVector uvE2 = er * e1 * e2;

            sb.Append(@"e'_3e_1e'_2 = " + uvE2.ToLatex() + @"\;");

            //Test &ri * e'j
            UnitVector uvE3 = UnitVector.KroneckerDelta(3, 1) * e2;

            sb.Append(@" \delta_{3 1}e_2 = " + uvE3.ToLatex() + @" \tag{1}");

            HtmlOutputMethods.WriteLatexEqToHtmlAndLaunch(sb.ToString(), "Test_UnitVector_Multiply_ElementaryMatrix.html"); //display Latex via mathjax

            return(0);
        }
        public static int Test_ElementaryMatrix_Multiply_UnitVector()
        {
            /*
             * Eij * er = ei*e'j*er = &jr *ei where & = Kronecker delta
             *
             */
            StringBuilder    sb  = new StringBuilder();
            ElementaryMatrix E12 = new ElementaryMatrix(4, 4, "E12");      // 4 x 4 ElementaryMatrix
            UnitVector       e1  = new UnitVector("e1", 4);                //Order four unit vector e1
            UnitVector       e2  = new UnitVector("e2", 4, RowColumn.Row); //Order four row unit vector e2
            UnitVector       er  = new UnitVector("e3", 4);                //Order four unit vector e3 our er above

            /*
             * i = 1, j = 2, r = 3
             */

            //Test matrix * unit vector, Eij * er
            UnitVector uvE1 = E12 * er;

            sb.Append(@"E_{12}e_3 = " + uvE1.ToLatex() + @"\;");

            //Test e1* e'j * er
            UnitVector uvE2 = e1 * e2 * er;

            sb.Append(@"e_1e'_2e_3 = " + uvE2.ToLatex() + @"\;");

            //Test &jr * ei
            UnitVector uvE3 = UnitVector.KroneckerDelta(2, 3) * e1;

            sb.Append(@" \delta_{2 3}e_1 = " + uvE3.ToLatex());

            HtmlOutputMethods.WriteLatexEqToHtmlAndLaunch(sb.ToString(), "Test_ElementaryMatrix_Multiply_UnitVector.html"); //display Latex via mathjax


            return(0);
        }