# How to reduce the determinant of a matrix to its simplest form

I have a $$12\times 12$$ matrix, of which I have taken the determinant. And I get a very big expression with three unknowns K1, K2 and b. The problem is how to reduce this expression to a simple form? I tried using Simplify and FullSimplify but it takes forever for getting a result.

matrix = {{0, 1., 0, 1., 0, 0, 0, 0, 0, 0, 0, 0},
{b, 0, b, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, -1. b^2 Sin[1.2 b], -1. b^2 Cos[1.2 b], b^2 Sinh[1.2 b], b^2 Cosh[1.2 b]},
{0, 0, 0, 0, 0, 0, 0, 0, -1. b^3 Cos[1.2 b], b^3 Sin[1.2 b], b^3 Cosh[1.2 b], b^3 Sinh[1.2 b]},
{Sin[1.2 b], Cos[1.2 b], Sinh[1.2 b], Cosh[1.2 b], 0, -1., 0, -1., 0, 0, 0, 0},
{b Cos[1.2 b], -1. b Sin[1.2 b], b Cosh[1.2 b], b Sinh[1.2 b], -1. b, 0, -1. b, 0, 0, 0, 0, 0},
{-1. b^2 Sin[1.2 b], -1. b^2 Cos[1.2 b], b^2 Sinh[1.2 b], b^2 Cosh[1.2 b], 0, 1. b^2, 0, -1. b^2, 0, 0, 0, 0},
{-1. b^3 Cos[1.2 b] - 1. K1 Sin[1.2 b], -1. K1 Cos[1.2 b] + b^3 Sin[1.2 b], b^3 Cosh[1.2 b] - 1. K1 Sinh[1.2 b], -1. K1 Cosh[1.2 b] + b^3 Sinh[1.2 b], 1. b^3, 0, -1. b^3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, Sin[1.6 b], Cos[1.6 b], Sinh[1.6 b], Cosh[1.6 b], 0, -1., 0, -1.},
{0, 0, 0, 0, b Cos[1.6 b], -1. b Sin[1.6 b], b Cosh[1.6 b], b Sinh[1.6 b], -1. b, 0, -1. b, 0},
{0, 0, 0, 0, -1. b^2 Sin[1.6 b], -1. b^2 Cos[1.6 b], b^2 Sinh[1.6 b], b^2 Cosh[1.6 b], 0, 1. b^2, 0, -1. b^2},
{0, 0, 0, 0, -1. b^3 Cos[1.6 b] - 1. K2 Sin[1.6 b], -1. K2 Cos[1.6 b] + b^3 Sin[1.6 b], b^3 Cosh[1.6 b] - 1. K2 Sinh[1.6 b], -1. K2 Cosh[1.6 b] + b^3 Sinh[1.6 b], 1. b^3, 0, -1. b^3, 0}
};

• What are the constraints on K1, K2 and b? – Αλέξανδρος Ζεγγ Dec 12 '18 at 5:51
• K1 and K2 are a positive real finite number. b is usually a positive real number which lies between 0 to 100 – acoustics Dec 12 '18 at 6:01
• Why do you want the determinant in its simplest form? And why don't you think that the result of Det[matrix] is in its simplest form? – David G. Stork Dec 12 '18 at 6:36
• The expression is too big . I want to simplify the result of the determinant – acoustics Dec 12 '18 at 7:02

A first step is to Rationalize the matrix before evaluating:

Det[matrix // Rationalize] // FullSimplify
(*2 b^12 (16 b^6 + 2 K1 K2 Cos[(12 b)/5] - 2 K1 K2 Cosh[(12 b)/5] +K1 K2 Cos[(4 b)/5] Cosh[4 b] + 8 b^3 (K1 - K2) Cosh[(6 b)/5] Sin[(6 b)/5] +8 b^3 (-K1 + K2) Cosh[(14 b)/5]Sin[(14 b)/5] + 8 b^3 (-K1 + K2) Cos[(6 b)/5] Sinh[(6 b)/5] + 2 K1 K2 Sin[(12 b)/5]Sinh[(12 b)/5] +8 b^3 (K1 - K2) Cos[(14 b)/5] Sinh[(14 b)/5] + 4 Cosh[(6 b)/5] Sin[4b] (2 b^3 (K1 + K2) Cosh[(14 b)/5] - K1 K2 Sinh[(14 b)/5]) -2 K1 K2 Sin[(8 b)/5] (-3Sinh[(8 b)/5] + Sinh[4 b]) +Cos[4 b] (-K1 K2 (Cosh[(4 b)/5] + 2 Cosh[(8 b)/5]) + 16b^6Cosh[4 b] - 4 b^3 (K1 + K2) Sinh[4 b]) + 2 Cos[(8 b)/5] (K1 K2 Cosh[4 b] - 2 b^3 (K1+ K2) Sinh[4 b]))*)

det = TrigReduce[Det[Rationalize[matrix]]];


Let's compare the complexity of the expressions:

LeafCount[Det[matrix]]
LeafCount[det]


5637

606

It is not as compact as Ulrich's proposal (which has LeafCount of only 282), but it is much faster and may serve as starting point for further simplifications.

• Yes, It is very useful. as you said FullSimplify will take some additional time to get the desired results, but the obtained expression compact. – acoustics Dec 12 '18 at 17:46