Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 928519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:01:34+00:00 2026-05-15T20:01:34+00:00

Given a matrix A (not neccessarily square) with independent columns, I was able to

  • 0

Given a matrix A (not neccessarily square) with independent columns, I was able to apply Gram-Schmidt iteration and produce an orthonormal basis for its columnspace (in the form of an orthogonal matrix Q) using Matlab’s function qr

A=[1,1;1,0;1,2]

[Q,R] = qr(A)

and then

>> Q(:,1:size(A,2))
ans =
  -0.577350269189626  -0.000000000000000
  -0.577350269189626  -0.707106781186547
  -0.577350269189626   0.707106781186547

You can verify that the columns are orthonormal

Q(:,1)'*Q(:,2) equals zero and

norm(Q(:,1)) equals norm(Q(:,2)) equals 1

Given a matrix that has independent columns (like A), is there a function in R that produces the (Gram-Schmidt) orthogonal matrix Q ?. R’s qr function doesn’t produce an orthogonal Q.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:01:35+00:00Added an answer on May 15, 2026 at 8:01 pm

    qr works, but it uses a unique convention and produces a qr object that you further operate on with qr.Q and qr.R:

    > A
         [,1] [,2]
    [1,]    1    1
    [2,]    1    0
    [3,]    1    2
    > A.qr <- qr(A)
    > qr.Q(A.qr)
               [,1]          [,2]
    [1,] -0.5773503 -5.551115e-17
    [2,] -0.5773503 -7.071068e-01
    [3,] -0.5773503  7.071068e-01
    > qr.R(A.qr)
              [,1]      [,2]
    [1,] -1.732051 -1.732051
    [2,]  0.000000  1.414214
    

    Is this the output you wanted?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

given a matrix of distances between points is there an algorithm for determining a
Given a NxN matrix with 0s and 1s. Set every row that contains a
Given two 3D vectors A and B, I need to derive a rotation matrix
Given a large sparse matrix (say 10k+ by 1M+) I need to find a
Given a matrix of boolean values (example): a b c +-------- X | 1
I have an n-partite (undirected) graph, given as an adjacency matrix, for instance this
Given a specific DateTime value, how do I display relative time, like: 2 hours
Given a Python object of any kind, is there an easy way to get
Given a select with multiple option's in jQuery. $select = $(<select></select>); $select.append(<option>Jason</option>) //Key =
Given a DateTime representing a person's birthday, how do I calculate their age in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.