
    \h                     B    S SK Jr  S	S jrS\4S jrS	S jrSSS.S jrg)
   )_iszeroFc                 r    U R                  USS9u  p#U Vs/ s H  o@R                  U5      PM     sn$ s  snf )aY  Returns a list of vectors (Matrix objects) that span columnspace of ``M``

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.columnspace()
[Matrix([
[ 1],
[-2],
[ 3]]), Matrix([
[0],
[0],
[6]])]

See Also
========

nullspace
rowspace
Tsimplifywith_pivots)echelon_formcolMr   reducedpivotsis        P/var/www/auris/envauris/lib/python3.13/site-packages/sympy/matrices/subspaces.py_columnspacer      s6    : nnhDnIOG$%fEE!Hf%%%s   4c                    U R                  X!S9u  p4[        U R                  5       Vs/ s H  oUU;  d  M
  UPM     nn/ nU H`  nU R                  /U R                  -  n	U R                  X'   [        U5       H  u  pX==   X:U4   -  ss'   M     UR                  U	5        Mb     U Vs/ s H  oR                  U R                  SU5      PM!     sn$ s  snf s  snf )a;  Returns list of vectors (Matrix objects) that span nullspace of ``M``

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.nullspace()
[Matrix([
[-3],
[ 1],
[ 0]])]

See Also
========

columnspace
rowspace
)
iszerofuncr   r   )rrefrangecolszeroone	enumerateappend_new)r   r   r   r   r   r   	free_varsbasisfree_varvecpiv_rowpiv_colbs                r   
_nullspacer"   &   s    4 ff
fFOG!!&&M=Mqf_MI=E 166) )& 1GLGX$566L !2 	S  +00%QFF1661a %00 > 1s   	CC*&Cc                     U R                  USS9u  p#[        [        U5      5       Vs/ s H  oBR                  U5      PM     sn$ s  snf )a  Returns a list of vectors that span the row space of ``M``.

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.rowspace()
[Matrix([[1, 3, 0]]), Matrix([[0, 0, 6]])]
Tr   )r   r   lenrowr
   s        r   	_rowspacer&   S   sA    " nnhDnIOG$)#f+$67$6qKKN$6777s   A)	normalize	rankcheckc                   SSK Jn  U(       d  / $ US   R                  S:H  nU Vs/ s H  ofR                  5       PM     nnU R                  " U6 nU" XqS9u  pU(       a$  UR
                  [        U5      :  a  [        S5      e/ n
[        UR
                  5       HD  nU(       a  U " USS2U4   R                  5      nOU " USS2U4   5      nU
R                  U5        MF     U
$ s  snf )a0  Apply the Gram-Schmidt orthogonalization procedure
to vectors supplied in ``vecs``.

Parameters
==========

vecs
    vectors to be made orthogonal

normalize : bool
    If ``True``, return an orthonormal basis.

rankcheck : bool
    If ``True``, the computation does not stop when encountering
    linearly dependent vectors.

    If ``False``, it will raise ``ValueError`` when any zero
    or linearly dependent vectors are found.

Returns
=======

list
    List of orthogonal (or orthonormal) basis vectors.

Examples
========

>>> from sympy import I, Matrix
>>> v = [Matrix([1, I]), Matrix([1, -I])]
>>> Matrix.orthogonalize(*v)
[Matrix([
[1],
[I]]), Matrix([
[ 1],
[-I]])]

See Also
========

MatrixBase.QRdecomposition

References
==========

.. [1] https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process
r   )_QRdecomposition_optional    )r'   z0GramSchmidt: vector set not linearly independentN)decompositionsr*   rowsr   hstackr   r$   
ValueErrorr   Tr   )clsr'   r(   vecsr*   all_row_vecsxr   QRretr   r	   s                r   _orthogonalizer8   i   s    ` :	GLLA%L!"TEEGTD"

DA$Q<DAQVVc$i'KLL
C166]a1gii.Ca1g,C

3  J #s   C$N)F)	utilitiesr   r   r"   r&   r8        r   <module>r<      s-    &D !W *1Z8, */% Er;   