예제 #1
0
        static void Main(string[] args)
        {
            Matrix2 m1 = new Matrix2(4, 2, 9, 0);
            Matrix2 m2 = new Matrix2(3, 1, -3, 4);

            Console.WriteLine(m1);
            Console.WriteLine(m2);
            Console.WriteLine(m2.Inverse());
            Console.WriteLine(m1.Det());
            Console.WriteLine(m1.Transpose());
            Console.WriteLine(m1 + m2);
            Console.WriteLine(m1 - m2);
            Console.WriteLine(m1 * m2);
            Console.WriteLine(m1 / m2);
        }
예제 #2
0
        public static Matrix2 operator |(Matrix2 m1, Matrix2 m2)
        {
            Matrix2 m3 = m1 * m2;

            return(m3 * m3.Det());
        }