DEV Community

Terra
Terra

Posted on • Edited on • Originally published at pourterra.com

Mathematics for Machine Learning - Day 15

Stray further from mathematics

We really do, it's getting more and more confusing yet that's a sign of progress! :D

Matrix Representation of Linear Mappings

Congratulations! Now you can't just write a basis without worrying if the basis is ordered or not. You've reached a stage where it's getting more and more technical. Now:

B=b1,,bn is an unordered basis and B=(b1,,bn) is an ordered basis \mathscr{B} = {b_1, \dots, b_n} \text{ is an unordered basis} \\ \text{ and } \\ \mathscr{B} = (b_1, \dots, b_n) \text{ is an ordered basis}

The topic that's going to be discuss later on will matter if the vector are in order or not.

Coordinates

Consider a vector space and an ordered basis

B=(b1,,bn) of VFor any xV \mathscr{B} = (b_1, \dots, b_n) \text{ of } V \\ \text{For any } x \in V

We obtain a unique representation (linear combination)

x=(α1b1,,αnbn) x = (\alpha_1 b_1, \dots, \alpha_n b_n)

of x with respect to B. Then:

(b1,,bn) are the coordinates of x with respect to B.And the vector [y1y2]Rn (b_1, \dots, b_n) \text{ are the coordinates of x with respect to B.} \\ \text{And the vector } \left[\begin{array}{c} y_1 \\ \vdots \\ y_2 \end{array}\right] \in \reals^n

is the coordinate vector / representation of x with respect to the ordered basis B.

Coordinate vector?

Yup, a basis effectively defines a coordinate system, much like the cartesian system.

There's a slight difference though, in this coordinate system, a vector:

xR2 x \in \reals^2

has a representation that tells us how to linearly combine

(e1 and e2) (e_1 \text{ and } e_2)

to obtain x.

What's the difference?

Yeah, cartesian is also a coordinate system that requires two points to make a two dimensional plain. But there's a twist, any basis of the vector defines a valid coordinate representation.

Example:

ParseError: KaTeX parse error: Unexpected end of input in a macro argument, expected '}' at end of input: …2) of \reals^2

This means we can write it as:

x=2e1+3e2 x = 2e_1 + 3e_2

However, we don't have to use the standard basis! be creative, for example, we can use:

b1=[11] and b2=[11]This will obtain the coordinates 12[15] b_1 = \left[\begin{array}{c} 1 \\ -1 \end{array}\right] \text{ and } b_2 = \left[\begin{array}{c} 1 \\ 1 \end{array}\right] \\ \text{This will obtain the coordinates } \frac{1}{2} \left[\begin{array}{c} -1 \\ 5 \end{array}\right]

Proof

What? how does changing one of the value into a minus affect it? Then let me change it into something that's easier to digest.

1a+1b=21a+1b=3 1a + 1b = 2 \\ -1a + 1b = 3

Then we use addition on it to find b

2b=5b=52Adding into any of the two functions well obtain a=12 2b = 5 \\ \therefore b = \frac{5}{2} \\ \text{Adding into any of the two functions well obtain } a = -\frac{1}{2}

Then to get the author's version, we just put the half on the front!

[1252]=12[15] \left[\begin{array}{c} -\frac{1}{2} \\ \frac{5}{2} \end{array}\right] = \frac{1}{2}\left[\begin{array}{c} -1 \\ 5 \end{array}\right]

Example image vector

See! it's the same value, just from a different perspective.


Acknowledgement

I can't overstate this: I'm truly grateful for this book being open-sourced for everyone. Many people will be able to learn and understand machine learning on a fundamental level. Whether changing careers, demystifying AI, or just learning in general, this book offers immense value even for fledgling composer such as myself. So, Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong, thank you for this book.

Source:
Axler, Sheldon. 2015. Linear Algebra Done Right. Springer
Deisenroth, M. P., Faisal, A. A., & Ong, C. S. (2020). Mathematics for Machine Learning. Cambridge: Cambridge University Press.
https://mml-book.com

Top comments (5)

Collapse
 
sc0v0ne profile image
sc0v0ne

Very good post !!!

Collapse
 
pourlehommes profile image
Terra

Honestly, with my level of confidence I'm more incline to think this is sarcasm more than anything.

Unless it's the meme. I'm proud of the meme this day :D

Collapse
 
sc0v0ne profile image
sc0v0ne

Don't think that way. You are writing that many do not have the courage. Remember dedication and discipline are your greatest weapons.

Thread Thread
 
pourlehommes profile image
Terra

Thank you sc0v0ne.

But, while I agree that dedication and discipline should be commended, without teaching and guidance it'll only get me so far. So if you feel the posts are wrong, please do tell me :D

Thread Thread
 
sc0v0ne profile image
sc0v0ne

Of course I'll talk hahaha.