Determinant of matrix 2

Algebra Level 2

Calculate det ( 2 6 4 3 1 5 9 3 7 ) . \det\left(\begin{array}{cc}2&6&4\\-3&1&5\\9&3&7 \end{array}\right).


The answer is 308.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

d e t 2 6 4 3 1 5 9 3 7 = [ 2 ( 1 ) ( 7 ) + 6 ( 5 ) ( 9 ) + 4 ( 3 ) ( 3 ) ] [ 9 ( 1 ) ( 4 ) + 3 ( 5 ) ( 2 ) + 7 ( 3 ) ( 6 ) ] det \left| \begin{matrix} 2 & 6 & 4 \\ -3 & 1 & 5 \\ 9 & 3 & 7 \end{matrix} \right| =\left[2(1)(7)+6(5)(9)+4(-3)(3)\right]-\left[9(1)(4)+3(5)(2)+7(-3)(6)\right]

= ( 14 + 270 36 ) ( 36 + 30 126 ) =(14+270-36)-(36+30-126)

= 248 ( 60 ) =248-(-60)

= 248 + 60 =248+60

= = 308 \color{#D61F06}\boxed{\large 308}

Why is it, 6(5)(9) or can it be any other number that you haven't used?

wojtek Geslak - 3 years, 3 months ago

det ( 2 6 4 3 1 5 9 3 7 ) = ( 2 ) ( 1 ) ( 7 ) + ( 6 ) ( 5 ) ( 9 ) + ( 4 ) ( 3 ) ( 3 ) ( 2 ) ( 5 ) ( 3 ) ( 6 ) ( 3 ) ( 7 ) ( 4 ) ( 1 ) ( 9 ) = 14 + 270 36 30 + 126 36 = 308 \begin{aligned} \det\left(\begin{array}{cc}2&6&4\\-3&1&5\\9&3&7 \end{array}\right) & = (2)(1)(7) + (6)(5)(9) + (4)(-3)(3) - (2)(5)(3) - (6)(-3)(7) - (4)(1)(9) \\ & = 14 +270 - 36 - 30 + 126 - 36 \\ & = \boxed{308} \end{aligned}

Vivek Sedani
May 3, 2014

Here is the C program to find determinant of Any matrix, by Me :) Enjoy..

Please Include stdio.h, malloc.h and math.h header files as they are not showing here..

/* C program to find determinant of any matrix, by Vivek Sedani */


//Please Include stdio.h, malloc.h and math.h header files here I dont know why they are not showing here
   //also include conio.h If you are using TC
    #include"<stdio.h>"
#include <malloc.h>
#include <math.h>
//#include <conio.h> for TC only


#define min(a,b)(a<b?a:b);

int abcd(int a1,int a2,int x)
{
    if(a1<a2)
    {
        if(x>=a1&&x<=a2)
        {
            return x;
        }else return a1;
    }
    else{
        if(x>a2&&x<a1)
        {
            return a1;
        }else return x;
    }
}

float determinant(float **a,int row,int col,int s,int os)
 {
    int i,y,k;
    float det=0;
 if(1==s){
    det=a[row][col];
    }
 else
 {
    for(i=0;i<s;i++)
    {

    y=abcd(col,(col+s-1)%os,(col+i+1)%os);
    if((col+s-1)%os-col>0)
    k=1; else k=-1;
    det=det+a[row][(col+i)%os]*pow(-1,i)*k*determinant(a,(row+1)%os,y,s-1,os);
    }
 }
 return det;
}

void scanmatrix(float **a,int m,int n)
  {
  int i,j;
   for(i=0;i<m;i++)
   {
   printf("\n Enter %dth row :",i+1);
     for(j=0;j<n;j++)
      {
      scanf("%f",&a[i][j]);
      }
   }
 }

    void main()
     {
  int m,i;
  float **a,*ans,det;
  // clrscr(); for TC only
  printf("\nEnter size of the square matrix :");
  scanf("%d",&m);
  a=(float **)malloc(sizeof(float *)*m);
  for(i=0;i<m;i++)
   {
   a[i]=(float *)malloc(sizeof(float)*m);
   }

  scanmatrix(a,m,m);
  det=determinant(a,0,0,m,m);
  printf("\ndeterminant is %f ",det);
 // getch(); for TC only
}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...