microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/pythontelem

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/linear_algebra/scalar_multiplication/solution.md

6lines · modepreview

You can again follow the definition given: to calculate the product of a number and a matrix, multiply each matrix element by that number. 

$$0.5 \cdot \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} =
= \begin{bmatrix} 0.5 \cdot 1 & 0.5 \cdot 2 \\ 0.5 \cdot 3 & 0.5 \cdot 4\end{bmatrix} = \begin{bmatrix} 0.5 & 1 \\ 1.5 & 2 \end{bmatrix}$$

@[solution]({"id": "linear_algebra__scalar_multiplication_solution", "codePath": "Solution.qs"})