Add tech_docs/math_objects_python.md
This commit is contained in:
57
tech_docs/math_objects_python.md
Normal file
57
tech_docs/math_objects_python.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Mathematical Objects and Their Applications in Python
|
||||
|
||||
This document explains different types of mathematical objects and their applications. Additionally, it provides information on Python libraries that can be used to work with these objects.
|
||||
|
||||
## Scalar
|
||||
|
||||
A **scalar** is a single number, typically used in mathematics to represent a magnitude or quantity. In programming and data science, scalars are often used as individual data points or constants.
|
||||
|
||||
### Example
|
||||
$$ a = 3 $$
|
||||
|
||||
### Python Libraries
|
||||
- **NumPy**: Used for handling numerical operations; scalars can be represented as `numpy.float64` or `numpy.int32`, etc.
|
||||
|
||||
## Vector
|
||||
|
||||
A **vector** is an ordered array of numbers, which can represent direction and magnitude in space. Vectors are fundamental in physics for describing velocities and forces, in engineering for load distributions, and in machine learning for feature representation.
|
||||
|
||||
### Example
|
||||
$$ \mathbf{v} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} $$
|
||||
|
||||
### Python Libraries
|
||||
- **NumPy**: Provides a powerful array structure that can be used to represent vectors.
|
||||
- **SciPy**: Utilized for scientific computations that involve vectors.
|
||||
|
||||
## Matrix
|
||||
|
||||
A **matrix** is a two-dimensional array of numbers used extensively in engineering, physics, computer science, and statistics. Matrices are crucial in solving systems of linear equations, transforming geometric data, and in algorithms for machine learning and artificial intelligence.
|
||||
|
||||
### Example
|
||||
$$ \mathbf{M} = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} $$
|
||||
|
||||
### Python Libraries
|
||||
- **NumPy**: Essential for creating and manipulating matrices.
|
||||
- **Pandas**: Often used for data manipulation and analysis; can handle data in a tabular form, akin to a matrix.
|
||||
- **Matplotlib**: Useful for visualizing data stored in matrices.
|
||||
|
||||
## Tensor
|
||||
|
||||
A **tensor** extends the concept of vectors and matrices to potentially higher dimensions. In the field of machine learning and neural networks, tensors are key structures, representing complex datasets and the parameters of the models themselves.
|
||||
|
||||
### Example
|
||||
$$ \mathcal{T} = \begin{bmatrix}
|
||||
\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} &
|
||||
\begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} \\
|
||||
\begin{bmatrix} 9 & 10 \\ 11 & 12 \end{bmatrix} &
|
||||
\begin{bmatrix} 13 & 14 \\ 15 & 16 \end{bmatrix}
|
||||
\end{bmatrix} $$
|
||||
|
||||
### Python Libraries
|
||||
- **TensorFlow**: A library designed specifically for working with tensors in neural networks.
|
||||
- **PyTorch**: Another library for machine learning that utilizes tensors as its core data structure.
|
||||
- **NumPy**: Can also be used for lower-dimensional tensors.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Understanding these basic mathematical objects is crucial for working effectively in fields such as data science, AI, physics, and engineering. Python, with its rich ecosystem of libraries, provides extensive support for manipulating these objects, making it a preferred language for scientific and engineering applications.
|
||||
Reference in New Issue
Block a user