Tutorial

Update of Kardi Teknomo's Tutorial

Saturday, October 29, 2005

Finding Eigen Value using Microsoft Excel Tutorials

Microsoft Excel Tutorials

Here is frequently asked question from web visitors:
Thanks first of all for putting up this great site!
I have a question regarding calculation of eigen values for a 3x3 matrix. While I could easily calculate eigen values and vectors for a 2x2 matrix (because after you get one value, ou can simply subtract it from the total variance to get the other), I am having some trouble calculating the same for a 3x3 where we would have three eigen values. I am not able to follow how we reiterate to get the complete set of eigen values.
For the first time, we set value of determinant=0, by changing value of lambda.
Thus we get the first eigen value. How do we get the next two? I tried your eigen value example, but I only found one of the three eigen values, namely 0.9233.The other two, 1 and 27.0767 were never found. Any idea why this happened?


Thank you for your questions. I can
understand your problem of getting other eigen values. Your problem
happen because of the initial value you set is far from the eigen
value. This is normal problem of difference equation. Please realize that
the approximation method I put in this tutorial is very sensitive to initial value. You
may get other eigen values if you can guess the nearest initial value.
Setting different initial value may give the other eigen value if the
eigen value is a basin of attraction.

Secondly, eigen value of non-symmetric matrix may contain complex
eigen value which cannot be solved using this kind of iteration. Other
method for symmetric matrix is to to hold the eigen value that you
have gotten and use MS excel Solver to find the other eigen values.

If you realy want to use Eigen value and Eigen vector for real problem
using MS excel, I suggest you to install free Add Ins library
matrix.xla from
http://digilander.libero.it/foxes/SoftwareDownload.htm. Its great
program that you may use many matrix functions.

Wednesday, October 26, 2005

Digital Root

Digital root tutorial is launched today. This tutorial is intended for students and teachers to discover mathematical pattern manually or with MS Excel. Using only addition and multiplication, many amazing patterns can be generated.

Thursday, October 20, 2005

Kardi Teknomo's Page

K-Means Clustering Tutorial

Code for distance matrix computation is updated. Now it can handle multidimensional variables.

The previous code that work only for 2 dimensions is given here for historical purposes.

function d=dist(A,B)
% DIST return distance matrix between point A=[x1 y1] and B=[x2 y2]
% Number of points in A and B are not necessarily the same.
% It can be use for distance-in-a-slice, distance-between-slice,
% and distance between guest-points-and-the-points
% A and B must contain two columns,
% first column is the X coordinates
% second column is the Y coordinates
% The distance matrix are distance between points in A as row
% and points in B as column.
% example: distance-in-a-slice= dist(A,A)
% distance between guest-point-and-the-point = dist(A,B) , hA=hB
% distance between slices = dist(A,B), with hA ~= hB or hA=hB
% A=[1 2; 3 4; 5 6]; B=[4 5; 6 2; 1 5; 5 8]
% dist(A,B)= [ 4.24 5.00 3.00 7.21;
% 1.41 3.61 2.24 4.47;
% 1.41 4.12 4.12 2.00 ]

[hA,wA]=size(A)
[hB,wB]=size(B)
if hA==1& hB==1
d=sqrt(dot((A-B),(A-B)));
else
C=[ones(1,hB);zeros(1,hB)]
D=flipud(C)
E=[ones(1,hA);zeros(1,hA)]
F=flipud(E)
G=A*C % = repmat(A(:,1),1,hB)
H=A*D % = repmat(A(:,2),1,hB)
I=B*E % = repmat(B(:,1),1,hA)
J=B*F % = repmat(B(:,2),1,hA)
d=sqrt((G-I').^2+(H-J').^2)
end

Friday, December 03, 2004

Excel tutorial

I created Microsoft Excel tutorial in my web site. I hope that it would be useful not only for my students, but also for my web site visitors. The contents are quite different from what other sites of Excel tutorial offer. My tutorial is useful for introduction to numerical analysis (with very simple explanation) and statistic that are not common usage of MS Excel.