Loading [MathJax]/jax/output/HTML-CSS/jax.js

Friday, 14 February 2014

Verifying correctness of vector solution for linear equation in three variables with the determinant form of the solution

Verifying the correctness of the vector solution for linear equation in three variables

In one of the earlier blogs it was shown that the solution of linear equations could be written entirely in vector form
In this blog I will verify the vector form of solution with the determinant form. Linear equation problem is given below

a1x+a2y+a3z=d1b1x+b2y+b3z=d2c1x+c2y+c3z=d3 Given below is the determinant form of solution. x=|d1a2a3d2b2b3d3c2c3||a1a2a3b2b2b3c3c2c3|   =d1b2c3d1b3c2d2a2c3+d2a3c2+d3a2b3b3b2a3|a1a2a3b2b2b3c3c2c3|  y=|a1d1a3b2d2b3c3d3c3||a1a2a3b2b2b3c3c2c3|   =d1b3c1d1b1c3+d2a1c3a3c1d2+b1a3d3d3a1b3|a1a2a3b2b2b3c3c2c3|  z=|a1a2d1b2b2d2c3c2d3||a1a2a3b2b2b3c3c2c3|   =d1b1c2d1c1b2+d2a2c1d2a1c2+d3a1b2d3b1a2|a1a2a3b2b2b3c3c2c3| Solving the same using the vector formula provided in earlier blog. Vector form of the above linear equations is given below. A.r=d1B.r=d2C.r=d3
Where
A=a1i+a2j+a3kB=b1i+b2j+b3kC=c1i+c2j+c3kr=xi+yj+zk
. is the usual dot product in vectors
i,j,k are unit vectors
r=(B×Cd1+C×Ad2+A×Bd3)A×B.C The denominator in the above equation is the volume of the parallelopipe. Which can be written in determinant form as below. The cross and dot product also solves to the same expression. D=|a1a2a3b1b2b3c1c2c3| All we need to do is show that the numerator is equal to the numerator of the determinant form.  B×Cd1=|ijkb1b2b3c1c2c3|d1 = i(b2c3c2b3)d1+j(c1b3b1c3)d1+k(b1c2c1b2)d1 C×Ad2=|ijkc1c2c3a1a2a3|d2 = i(c2a3a2c3)d2+j(a1c3c1a3)d2+k(c1a2a1c2)d2 A×Bd3=|ijka1a2a3b1b2b3|d3 = i(a2b3b2a3)d3+j(b1a3a1b3)d3+k(a1b2a2b1)d3   B×Cd1+C×Ad2+A×Bd3|a1a2a3b1b2b3c1c2c3| =i(b2c3d1c2b3d1+c2a3d2a2c3d2+a2b3d3b2a3d3)+j(c1b3d1b1c3d1+a1c3d2c1a3d2+b1a3d3a1b3d3)+k(b1c2d1c1b2d1+c1a2d2a1c2d2+a1b2d3a2b1d3)|a1a2a3b1b2b3c1c2c3| The components of the above vector are same as the solution of x,y,x arrived at by using the determinant method. Hence the two results are verified to be correct.
RP
info@softanalytics.net




Thursday, 13 February 2014

Discussing orderless choice of two items from n items

Orderless choice of 2 objects from n objects

We know that the number of ways of choosing two items from n items is given by nC2
We can look at the choice problem as in the diagram below.
Each node in the tree is representative of a choice of two items. Therefore total number of choices is equal to the number of nodes in the above tree. Total number of nodes is
1+2+3+4......(n1) = n(n1)2 = nC2
Similar analysis and derivation could be done for nC3 and nCr



RP
info@softanalytics.net




Sunday, 24 November 2013

Solution of Linear Eqns in three dimensions

The solution of the following set of equations has been well studied.

a1x+a2y+a3z=d1b1x+b2y+b3z=d2c1x+c2y+c3z=d3
The most popular method of solving this is through determinants.

In todays article I am putting a different form and solution. for the above equations.
Changing the form of these equations to Vectors

We get
A.r=d1B.r=d2C.r=d3
Where
A=a1i+a2j+a3kB=b1i+b2j+b3kC=c1i+c2j+c3kr=xi+yj+zk
. is the usual dot product in vectors
i,j,k are unit vectors
It occurs to me that the solution for the above could be
r=(B×Cd1+C×Ad2+A×Bd3)A×B.C
I have coarsely checked this for correctness by solving using determinants and have found
similar result.

The method of coming to the above solution is as below

C×B.A.r=C×Bd1C×A.B.r=C×Ad2A×B.C.r=A×Bd3
An implicit associativity is assumed above which is not correct. The above three equations are added and we get

[C×B.A+C×A.B+A×B.C].r=C×Bd1+C×Ad2+A×Bd3
Hence from the above after rearranging we get r=C×Bd1+C×Ad2+A×Bd3A×B.C+C×B.A+C×A.Breduces tor=(B×Cd1+C×Ad2+A×Bd3)A×B.C as the other two components are of opposite sign and cancle each other
The below is true since they represent the volume of the parallelopiped formed by vectors A,B,C. Assuming the vectors are cyclic in order in 3D space. Then A×B.C=B×C.A=C×A.BA×B.C=B×A.CB×C.A=C×B.AC×A.B=A×C.B

The above solution could be extended for dimensions higher than three. In this I am not covering the same.

Alternate solution to arriving at the aboev formula

Assuming that the solution to the above equation is of the form without any loss of generality
r=tA×B+uB×C+vC×A where t,u,v are scalars coefficients.
t,u,v can be solved as below

Substitute r into the original equations
  A(tA×B+uB×C+vC×A)=d1A.A×B=0A.B×C has some valueA.C×A=0 Therefore we get u=d1A.B×CSimilarly for t,v we get t=d2C.A×Bv=d3B.C×A
Since the A.B×C=C.A×B=B.C×A= volume of parallelopipe

Therefore the solution to the linear equation is
Substituting u,t,v in the initial equation we get the following
r=B×Cd1+C×Ad2+A×Bd3A×B.C RP
info@softanalytics.net



Friday, 6 September 2013

Area of triangle in 3D space

Once it occurred to me if there was a very quick way (split seconds) of computing the area of the triangle formed by the points of axis intercepts of the plane
xa+yb+zc=1 Solution:
A half tetrahedron is formed by the planes xy,yz,xz and xa+yb+zc=1
Three of the sides of the tetrahedron have area ab/2,bc/2,ac/2. These sides are orthogonal
Hence the vector equivalent of the resultant is
abi2+bcj2+ack2  (where i,j,k are unit vectors)
Modulus of the resultant is (   a2b2/4+b2c2/4+a2c2/4   )

Area of interest is

a2b2/4+b2c2/4+a2c2/4
This method could be applied to the generic case where we need to find the area of the
triangle formed by (x1,y1,z1)(x2,y2,z2)(x3,y3,z3)
Steps would be as below

Transform the coordinates in such a manner that the coordinates above turn into axes intercepts
(0,0,a)(0,b,0)(c,0,0)

Then apply the formula above

RP
info@softanalytics.net



Thursday, 5 September 2013

Analyzing the differentiability of x2

Analyzing differentiability of x2

As we see a quick simplification of x2 yields x which is a straight line.
Another simplification yields |x|

Clearly |x| is not differentiable whereas x is differentiable.

Some people might contest the |x| simplification saying that is not true. I think both simplifications are correct and hence depending upon the simplification this may or may not be differentiable.

RP
info@softanalytics.net