Linear Algebra

Project Euler 102: For how many triangles in the text file does the interior contain the origin?

Project Euler 102: For how many triangles in the text file does the interior contain the origin?

Problem 102 of Project Euler asks us the following question

Three distinct points are plotted at random on a Cartesian plane, for which -1000 ≤ xy ≤ 1000, such that a triangle is formed.

Consider the following two triangles:

A(-340,495), B(-153,-910), C(835,-947)

X(-175,41), Y(-421,-714), Z(574,-645)

It can be verified that triangle ABC contains the origin, whereas triangle XYZ does not.

Using triangles.txt  a 27K text file containing the co-ordinates of one thousand “random” triangles, find the number of triangles for which the interior contains the origin.

NOTE: The first two examples in the file represent the triangles in the example given above.

Continue reading →

Posted by Kristian in Project Euler, 13 comments

A Short Treatise on a Vectors Concept

I have been in contact with Frederick Koh from Whitegroupmaths.com who kindly agreed that he would write a guest post for the blog to promote what he has to offer – Tutoring in A level maths in Singapore.  So without further ado let me present you with the real content.

I have been asked on numerous occasions by students to provide a short effective mathematical proof verifying the fact that obtaining the vector product of the normals characterising two separate non parallel planes in 3 dimensional Cartesian space produces the direction vector of the line arising from the intersection of the above mentioned planes. I shall share this here:

(Note that the reader is assumed to possess knowledge of basic scalar and vector product operations) Continue reading →

Posted by Kristian in Math, 1 comment
Khan Academy – a great source of math knowlegde

Khan Academy – a great source of math knowlegde

This post is shameless promotion of what I think is a great site – Khan Academy. If you don’t like shameless promotions, you should stop reading now.  The site features a whole set of instructional videos along with a good amount of exercises. All topics are what I consider to be some basic skills of mathematics. Not basic because they are simple skills, but because they are fundamental for you to build upon. Continue reading →

Posted by Kristian in Math, 3 comments

Course in Linear Algebra by Gilbert Strang

Within the field of mathematics I handle every day linear algebra plays a vital role. Linear algebra is a field of mathematics that studies vectors and vector spaces. On common use of linear algebra is to solve a set of linear equations. Personally I learned it in university using a book by David C. Lay called Linear Algebra and Its Applications. It is a perfectly good book, and I can recommend it if you want to have a book on the topic.

The reason why I bring up the topic, is that I rediscovered a video version a MIT course in linear algebra taught by Gilbert Strang. I found the videos when I first studied to my exam in linear algebra. I think he teaches it in a very understandable manner.  All of the videos can be found at Academic Earth. However, I think that the videos there are poor quality, so I have compiled a list of the videos representing the course in a better quality. Continue reading →

Posted by Kristian in Math, 6 comments