jab
jab

Reputation: 5823

Efficient Calculation of Determinant on change for 3X3 matrix?

Let's say you were given a 3x3 matrix of values and only a particular column changes values between iterations.

On Step 1 I have X:

[2.0, 4.6, 3.4]
[3.2, 6.7, 4.1]
[2.1, 1.4, 5.3]

Whose determinant is -11.476

Now on Step 2 I have X, with the second column populated with new values.

[2.0, 6.5, 3.4]
[3.2, 3.4, 4.1]
[2.1, 0.8, 5.3]

Is there a quick way to calculate the determinant of this matrix given the previous state of the matrix and its previous determinant? I want to preserve some of the information known at the previous state. Only columns change on each iteration.

Upvotes: 1

Views: 948

Answers (2)

Ashis Kumar Sahoo
Ashis Kumar Sahoo

Reputation: 144

If your first and third columns are constant and only second column varies, then you can transform this into a formula:

[2.0, a, 3.4]
[3.2, b, 4.1]
[2.1, c, 5.3]

= -a x [3.2, 4.1][2.1, 5.3] + b x [2.0, 3.4][2.1, 5.3] - c x [2.0, 3.4][3.2, 4.1]

= -8.35 x a + 3.46 x b + 2.68 x c

So now you have a formula that you can use.

Upvotes: 2

lhf
lhf

Reputation: 72312

If it's always the same column that changes you can use Laplace expansion with respect to that column.

Upvotes: 3

Related Questions