using System; using System.Collections.Generic; using System.Linq; using System.Text; using L = Science.Mathematics.LinearAlgebra; namespace Strang3Ed.Chapter03.Section1 { public class Example03 { public Example03() { } private string result; public string Result { get { return result; } } public void Compute() { L.Matrix a = new L.Matrix(2,2); a[0, 0] = 2.0; a[0, 1] = 3.0; a[1, 0] = 0.0; a[1, 1] = 4.0; L.Matrix b = new L.Matrix(2, 2); b[0, 0] = -1.0; b[0, 1] = 2.0; b[1, 0] = 0.0; b[1, 1] = -6.0; result += (-1.0*a).ToString(); result += (a + b).ToString(); } } } /* -2 -3 0 -4 1 5 0 -2 */