Calculation of lightning for a virtual room using the radiosity method (image by Topi Talvitie)

Mathematics is applied everywhere in modern life. Whenever you play an mp3 music file, a mathematical algorithm is transforming the zeros and ones in the file into music. Medical CT scans (Computed Tomography) are calculated using mathematical formulas. Washing machines, traffic light control centres, car transmissions and Internet search engines are following sets of mathematical instructions.

It is important to note that the connection between abstract mathematics and the real world is provided by algorithms. Useful mathematics cannot be made only on blackboard, what is needed in addition is programming.

The aim of this course is to train the students in mathematical modelling and problem-solving using algorithms.

Each week there will be
- one lecture given in Finnish covering a topic of numerical analysis
- one lecture given in English consisting of live coding, where we build computational models and solutions to practical problems.

There is no course exam. You gain credits from this course only by completing the weekly exercises.

*** Friday's exercise group 3 at 10-12 has been moved to the computer lab C128. Feel free to participate in this exercise session if you do not own a laptop! ***



Lisää uusi viesti

Käyttäjän Siiri Rautio kuva

Siiri Rautio

Julkaistu, 19.4.2018 klo 16:28

The last lecture of the course will be given on 25.4.2018. The lectures 30.4.2018 and 2.5.2018 are cancelled. The exercises and exercise groups will be held normally.

Käyttäjän Siiri Rautio kuva

Siiri Rautio

Julkaistu, 17.4.2018 klo 11:01

Please use the Moodle page of the course to submit your solutions of the exercises. Do NOT use the old email address! Submissions to old email address are not accepted starting strictly from Exercise 4.

Käyttäjän Siiri Rautio kuva

Siiri Rautio

Julkaistu, 5.4.2018 klo 11:56

Friday's exercise group 3 at 10-12 has been moved to the computer lab C128. Feel free to participate in this exercise session if you do not own a laptop!


Tästä osiosta löydät kurssin opetusaikataulun. Tarkista mahdolliset muut aikataulut kuvauksesta.

Ma 12.3.2018
14:15 - 16:00
Ke 14.3.2018
10:15 - 12:00
Ma 19.3.2018
14:15 - 16:00
Ke 21.3.2018
10:15 - 12:00
Ma 26.3.2018
14:15 - 16:00
Ke 28.3.2018
10:15 - 12:00
Ma 9.4.2018
14:15 - 16:00
Ke 11.4.2018
10:15 - 12:00
Ma 16.4.2018
14:15 - 16:00
Ke 18.4.2018
10:15 - 12:00
Ma 23.4.2018
14:15 - 16:00
Ke 25.4.2018
10:15 - 12:00
Ma 30.4.2018
14:15 - 16:00
Ke 2.5.2018
10:15 - 12:00


This course does not follow any specific material. All material needed will be available on this webpage.
If you are not familiar with Matlab, please check out Chapter 1 of

Flinga link:

***Course progress and materials:

* Lecture 25.4. FFT in 1D and 2D (Samu)
(1) In the first part we recorded a short sound clip (called FourierParas.m4a, available on this page) and filtered it using FFT. Three types of filters were used: low-pass, band-pass and high-pass. The Matlab file AudioFourier2.m performs the filtering and plays the original and filtered sound. Screen capture video:
(2) In the second part we imported a photo of size 1024x1024 (available as LobsterFight1024_1.png on this page) and filtered it using two-dimensional FFT.

* Lecture 23.4. Finite difference method (Vesa)

* Lecture 23.4. Finite difference methods
(1) During the first lecture, we considered the finite difference solution of general first order initial value problems y'(t)=f(t,y(t)), y(0)=y_0. We also implemented the fourth order Runge-Kutta method (RK4) in Matlab (rungekutta4.m).
(2) During the second lecture, we considered the finite difference approximation of Poisson's equation. We considered two numerical experiments: finding missing pixel values in a rectangular image (see Samuli's handout Poisson_FD_v2.m and our solution dirichlet.m) and closed the lecture by assessing numerically whether the FD approximations of isospectral drums have the same eigenvalues (isospectral.m).
Material: fdm.pdf, Poisson_FD_v2.pdf, rungekutta4.m, dirichlet.m, isospectral.m

* Lecture 18.4. Computation of Fourier series using Matlab (Samuli Siltanen)
Computing Fourier series coefficients for a simple synthetic signal. Observing the quality of approximation when more terms are used in the series. Also, we took a look at the "Gibbs phenomenon," or oscillations near discontinuities arising from approximating an irregular signal with a finite number of Fourier series terms.
Also, in the end of the lecture we recorded a speech signal and imported it into Matlab for analysis and filtering. However, we did only get started with that and will continue next week.
Matlab routine: FourierSeries1.m
Screen capture video:

* Lecture 16.4.2018 Fourier series and FFT (Jesse Railo)
First part: revision on complex numbers, introduction to Fourier series, calculation of Fourier coefficients
Second part: discrete Fourier transform (DFT), inverse DFT, DFT matrix, briefly 2-radix Fast Fourier transform (FFT)
Material: FFT_matrix_18_v1.pdf

* Lecture 11.4.2018
First part: least-squares fitting of models to data, continued from last time. Fitted was a parabola to 2D data and a plane to 3D data. See screen capture videos and m-files.
Second part: first encounter with Fourier series.

* Lecture 9.4.2018
(1) During the first lecture, we discussed the Lagrange interpolating polynomial and its application to constructing the basic Newton-Cotes integration formulae: midpoint rule, trapezoidal rule, Simpson's rule, and Simpson's 3/8 rule. In addition, we gave the general recipe for constructing arbitrary Newton-Cotes formulae.
(2) During the second lecture, we discussed orthogonal polynomials and familiarized ourselves with Gaussian quadratures. We discussed the Gram-Schmidt method and its application to generating orthogonal polynomials. During the lecture, we also gave a proof sketch for the "necessary direction" of the three-term recurrence formula of orthogonal polynomials.
(3) Finally, we very briefly touched on a couple of recipes for conducting multidimensional numerical integration.
Material: GaussLegendreRule.m, GaussHermiteRule.m, numint.pdf

* Lecture 28.3.2018
(1) Least-squares solution continued.
The Matlab file is available as LeastSquares2.m.
(2) Fitting a linear model to data.
The Matlab file is available as LeastSquares3.m. The water heating data measured at the end of the lecture is attached in image format as WaterTempMeas.jpg.

Screen shot videos of the Matlab coding sessions are available in the "video" section of this course homepage.

* Lecture 26.3.2018 Least squares solutions and SVD (Jesse Railo)
Material: LeastSquaresStuff_18_v1.pdf

* Lecture 21.3.2018
(1) Demonstration of the PageRank algorithm with a very simple 5-page Internet model. See the file FivePageInternet.pdf below. The Matlab file is available as "FivePageInternetPageRank.m."
(2) First encounter with the least-squares solution method for systems of linear equations. We solved a uniquely solvable set of two equations by matrix inversion, and we saw that a non-solvable system can be solved in the least-squares sense. See the Matlab file "LeastSquares1.m."
Screen shot videos of the Matlab coding sessions are available in the "video" section of this course homepage.

* Lecture 19.3.2018
We discussed Markov chains, stochastic matrices and their properties, and the (Google) PageRank algorithm.

*Lecture 14.3.2018
In the first half of the lecture, we discussed matrix eigenvalues and eigenvectors as well as the power method for computing the dominant eigenpair of a matrix.
In the second half of the lecture we discussed a Markov chain model for market share behaviour of imaginary telecommunication companies. Remember the important slogan "All models are wrong, but some are useful." The slides are available below by the name "Lecture slides concerning Markov model for market shares."
The Matlab file is available below as "MarketShareMarkov.m."
Screen shot videos of the Matlab coding sessions are available in the "video" section of this course homepage.

*Lecture 12.3.2018
The introductory slides are in file CourseIntroduction.pdf below.
The Matlab routines written about the farm example are available below by the names "farm.m" and "FarmLegsHeads.m." The X-ray tomography slides are in file Xraytomo.pdf below (may be helpful in Exercise 3 Problem 5).



Kurssin suorittaminen

The lectures are held on weeks 11-18, Mon 14-16 and Wed 10-12 in hall B123 of Exactum. Two hours of exercise classes per week.

You gain credits from this course only by computing the exercises (there is no exam). There are four simple one-score exercises and two more challenging three-score exercises per week (tentative). Return your solutions as a single PDF file (no other formats are accepted!) containing your Matlab codes (as text), results, images, comments, and explanations at the Moodle page of the course before the deadline (further instructions are given at the exercise groups if needed).

The exercise groups are for getting advice from an assistant in solving the exercise problems. (Participating the exercise class is not obligatory.)

The final grade limits will be decided at the end of the course. However, completing 40% of the exercises (24 points out of 60) will be enough for passing the course and completing 90% of the exercises (54 points out of 60) guarantees the highest grade.


Opintojaksosta vastaa matemaattisten tieteiden kandiohjelma ja se kuuluu matematiikan aineopintoihin

Lineaarialgebra 1.

Kurssin käytyään opiskelija osaa matemaattisen mallinnuksen perusteet ja ohjelmoinnin Matlab-työkalulla.

Toinen opiskeluvuosi, lineaarialgebran peruskurssi esitietona.

Järjestetään kevätlukukaudella nelosperiodissa

Perehdytään lineaarialgebran ja matriisilaskennan käyttöön tietokoneohjelmoinnin keinoin. Kurssilla toteutetaan mallinnusalgoritmeja käytännön ongelmiin, kuten valokuvien käsittelyyn, virtuaalisen tilan valaistuksen laskentaan, vaahteranlehtien muotojen Prokrustes-analyysiin ja numeeriseen integrointiin. Kurssin esimerkkien sisältö vaihtelee hiukan vuosittain, mutta matemaattiset tekniikat ovat samat.

Poole: Linear algebra, second edition, Thomson Brooks/Cole 2006, ISBN 0-534-40596-7.

Luennoitsija opettaa livekoodauksen keinoin, ja ruutukaappausvideot julkaistaan YouTubessa.

Hyväksyttyjen tehtävien prosenttiosuus määrää arvosanan.

Luentoja voi seurata, mutta ei ole pakko. Suoritus tapahtuu viikottaisten tietokonelaskuharjoitusten kautta: riittävästi tehtäviä täytyy saada tehdyksi. Tehtäviä ei ole pakko tehdä etukäteen, vaan ne voi toteuttaa harjoituksissa. On myös mahdollista palauttaa ratkaisut sähköpostitse, eli etäsuorittaminen on täysin OK.