## Particular and General Solutions

Ever wonder, if there's an equation with two or more variables that aren't known and there's not enough information to use basic elimination method? Fear not, there's a solution.

Also, this topic will only discuss on depth regarding particular and general solutions as I found that it takes me even more than an hour to really understand this and I find it very fascinating :D

### Particular Solutions

When a system has more than one solution, it's called a particular/special solution. One of the solution is if there are columns with only ones and zeros, the position of ones are unique in rows and columns, and ones are contained in all the rows.

#### Example:

Now, you might find this to be impossible to solve, but let's break it down each matrix at a time.

##### Take a look at matrix A:

you'll find that the 1st, 2nd, and 4th column if isolated becomes an identity matrix or as I've stated before, a unique ones in all rows and zeros.

##### While B can become be decoupled to each row:

##### Meaning:

If we ignore the 3rd and 5th column entirely, we can find the particular solution!

Congratulations! You've found the particular solution!

## General Solutions

Now this is where it took me an hour to understand what they were saying, so let's dive into it.

General solutions are basically adding in 0 to the equation. Instead of

We'll be adding in 0 to the first section based on the amount of non-identity matrix related columns (In our case it's two, the 3rd and 5th column)

The lambda is used because since it's multiplied by 0, any scaler added will still remain zero, so it covers all values added to it.

### First General Solution (3rd Row)

#### Using the same decouple method as before:

You'll remember that this decouple when added to x in the order of the identity matrix will become the answer. Meaning:

#### So how do I make it zero?

Easy! the column that's associated to the matrix (In our case is the 3rd) we make it -1.

#### Here's the proof

### Now we add the first answer to our general solution!

### Second General Solution (5th Row)

#### Surprize Quiz!

Now that you know how to find the equation for the general solution, try finding the second one yourself! The answer is at the bottom so you can check if you're correct or not.

### The full equation.

We've found the particular solutions that's needed to create the general solution!

For clarity, let's discuss what we did:

- Find the particular solution to Ax = B
- Find all the solutions to Ax = 0
- Add steps one and two together

With these steps finished, congratulations! you've become familiar with particular and general solutions. From here on out, you know that there are cases where large unknown variables with little equations can be solved with the right conditions.

#### The general solution

P.S. The book notated using large curly brackets `{`

but it returned an error on Dev.to so I'm using normal brackets (It's working on my website though!). Also, hope you got the answer right :D

## 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:

Deisenroth, M. P., Faisal, A. A., & Ong, C. S. (2020). Mathematics for Machine Learning. Cambridge: Cambridge University Press.

https://mml-book.com

## Top comments (0)