private void twoRange_Click(object sender, EventArgs e)
        {
            Matrix matrix = new Matrix(twoDataGridView.Rows.Count, twoDataGridView.Columns.Count);

            for (int i = 0; i < twoDataGridView.Rows.Count; i++)
            {
                for (int j = 0; j < twoDataGridView.Columns.Count; j++)
                {
                    if (twoDataGridView.Rows[i].Cells[j].Value == null)
                    {
                        matrix[i, j] = 0;
                    }
                    else
                    {
                        matrix[i, j] = double.Parse(twoDataGridView.Rows[i].Cells[j].Value.ToString());
                    }
                }
            }
            MessageBox.Show(FuncMatrix.Rank(matrix).ToString());
        }
        private void oneDeterminant_Click(object sender, EventArgs e)
        {
            Matrix matrix = new Matrix(oneDataGridView.Rows.Count, oneDataGridView.Columns.Count);

            for (int i = 0; i < oneDataGridView.Rows.Count; i++)
            {
                for (int j = 0; j < oneDataGridView.Columns.Count; j++)
                {
                    if (oneDataGridView.Rows[i].Cells[j].Value == null)
                    {
                        matrix[i, j] = 0;
                    }
                    else
                    {
                        matrix[i, j] = double.Parse(oneDataGridView.Rows[i].Cells[j].Value.ToString());
                    }
                }
            }
            MessageBox.Show(FuncMatrix.Determinant(matrix).ToString());
        }
        private void twoTriangle_Click(object sender, EventArgs e)
        {
            Matrix mB = new Matrix(twoDataGridView.Rows.Count, twoDataGridView.Columns.Count);

            for (int i = 0; i < twoDataGridView.Rows.Count; i++)
            {
                for (int j = 0; j < twoDataGridView.Columns.Count; j++)
                {
                    if (twoDataGridView.Rows[i].Cells[j].Value == null)
                    {
                        mB[i, j] = 0;
                    }
                    else
                    {
                        mB[i, j] = double.Parse(twoDataGridView.Rows[i].Cells[j].Value.ToString());
                    }
                }
            }
            ResultForm fr = new ResultForm(FuncMatrix.Triangle(mB));

            fr.Show();
        }